From 0291aea60bfd1f66dbe8138568ee26c4ddaa2a91 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 26 五月 2026 11:41:10 +0800
Subject: [PATCH] 列表查询按照id倒序
---
src/main/resources/mapper/technology/TechnologyOperationParamMapper.xml | 2 +-
src/main/resources/mapper/basic/CustomerMapper.xml | 4 ++++
src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml | 1 +
src/main/java/com/ruoyi/technology/pojo/TechnologyParam.java | 6 ++++++
src/main/java/com/ruoyi/customervisits/service/impl/CustomerVisitsServiceImpl.java | 2 +-
src/main/resources/mapper/sales/SalesQuotationMapper.xml | 1 +
src/main/resources/mapper/technology/TechnologyOperationMapper.xml | 2 +-
src/main/resources/mapper/collaborativeApproval/SealApplicationManagementMapper.xml | 1 +
src/main/resources/mapper/approve/ApproveProcessMapper.xml | 1 +
src/main/resources/mapper/approve/KnowledgeBaseMapper.xml | 4 ++--
src/main/resources/mapper/collaborativeApproval/NoticeMapper.xml | 1 +
src/main/resources/mapper/collaborativeApproval/RulesRegulationsManagementMapper.xml | 3 ++-
12 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/ruoyi/customervisits/service/impl/CustomerVisitsServiceImpl.java b/src/main/java/com/ruoyi/customervisits/service/impl/CustomerVisitsServiceImpl.java
index 2e0a0b0..55c00b9 100644
--- a/src/main/java/com/ruoyi/customervisits/service/impl/CustomerVisitsServiceImpl.java
+++ b/src/main/java/com/ruoyi/customervisits/service/impl/CustomerVisitsServiceImpl.java
@@ -37,7 +37,7 @@
wrapper.like(CustomerVisits::getVisitingPeople, customerVisits.getVisitingPeople());
}
}
-
+ wrapper.orderByDesc(CustomerVisits::getId);
return customerVisitsMapper.selectPage(page, wrapper);
}
diff --git a/src/main/java/com/ruoyi/technology/pojo/TechnologyParam.java b/src/main/java/com/ruoyi/technology/pojo/TechnologyParam.java
index 75d56cf..8f2672d 100644
--- a/src/main/java/com/ruoyi/technology/pojo/TechnologyParam.java
+++ b/src/main/java/com/ruoyi/technology/pojo/TechnologyParam.java
@@ -1,8 +1,10 @@
package com.ruoyi.technology.pojo;
import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
@@ -53,6 +55,8 @@
@Schema(description = "鍒涘缓鏃堕棿")
@TableField(fill = FieldFill.INSERT)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@Schema(description = "淇敼浜�")
@@ -61,6 +65,8 @@
@Schema(description = "淇敼鏃堕棿")
@TableField(fill = FieldFill.INSERT_UPDATE)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
@Schema(description = "閮ㄩ棬ID")
diff --git a/src/main/resources/mapper/approve/ApproveProcessMapper.xml b/src/main/resources/mapper/approve/ApproveProcessMapper.xml
index dd651c0..f3e628f 100644
--- a/src/main/resources/mapper/approve/ApproveProcessMapper.xml
+++ b/src/main/resources/mapper/approve/ApproveProcessMapper.xml
@@ -40,5 +40,6 @@
<if test="req.approveType != null ">
and approve_type = #{req.approveType}
</if>
+ order by id desc
</select>
</mapper>
diff --git a/src/main/resources/mapper/approve/KnowledgeBaseMapper.xml b/src/main/resources/mapper/approve/KnowledgeBaseMapper.xml
index e4819c2..8d41ef1 100644
--- a/src/main/resources/mapper/approve/KnowledgeBaseMapper.xml
+++ b/src/main/resources/mapper/approve/KnowledgeBaseMapper.xml
@@ -16,6 +16,6 @@
and type = #{knowledgeBase.type}
</if>
</where>
-
+ order by id desc
</select>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/src/main/resources/mapper/basic/CustomerMapper.xml b/src/main/resources/mapper/basic/CustomerMapper.xml
index 8117c66..2957c7e 100644
--- a/src/main/resources/mapper/basic/CustomerMapper.xml
+++ b/src/main/resources/mapper/basic/CustomerMapper.xml
@@ -52,6 +52,7 @@
)
</if>
</where>
+ order by c.id desc
</select>
<select id="list" resultType="com.ruoyi.basic.vo.CustomerVo">
@@ -106,6 +107,7 @@
)
</if>
</where>
+ order by c.id desc
</select>
<select id="customewTransactions" resultType="com.ruoyi.sales.vo.CustomerTransactionsVo">
select T1.customer_id,
@@ -144,6 +146,7 @@
AND c.customer_name LIKE CONCAT('%', #{customerName}, '%')
</if>
</where>
+ order by T1.customer_id desc
</select>
<select id="customewTransactionsDetails"
resultType="com.ruoyi.sales.vo.CustomerTransactionsDetailsVo">
@@ -189,5 +192,6 @@
group by sl.id
)T3 on T3.id = sl.id
where sl.customer_id = #{customerId}
+ order by sl.id desc
</select>
</mapper>
diff --git a/src/main/resources/mapper/collaborativeApproval/NoticeMapper.xml b/src/main/resources/mapper/collaborativeApproval/NoticeMapper.xml
index 08cf865..6a3be9e 100644
--- a/src/main/resources/mapper/collaborativeApproval/NoticeMapper.xml
+++ b/src/main/resources/mapper/collaborativeApproval/NoticeMapper.xml
@@ -17,5 +17,6 @@
and n.status = #{ew.status}
</if>
</where>
+ order by n.id desc
</select>
</mapper>
diff --git a/src/main/resources/mapper/collaborativeApproval/RulesRegulationsManagementMapper.xml b/src/main/resources/mapper/collaborativeApproval/RulesRegulationsManagementMapper.xml
index 03dc024..9ae4b8d 100644
--- a/src/main/resources/mapper/collaborativeApproval/RulesRegulationsManagementMapper.xml
+++ b/src/main/resources/mapper/collaborativeApproval/RulesRegulationsManagementMapper.xml
@@ -27,5 +27,6 @@
and rrm.category = #{ew.category}
</if>
</where>
+ order by rrm.id desc
</select>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/src/main/resources/mapper/collaborativeApproval/SealApplicationManagementMapper.xml b/src/main/resources/mapper/collaborativeApproval/SealApplicationManagementMapper.xml
index d8a5956..53b2f3c 100644
--- a/src/main/resources/mapper/collaborativeApproval/SealApplicationManagementMapper.xml
+++ b/src/main/resources/mapper/collaborativeApproval/SealApplicationManagementMapper.xml
@@ -37,5 +37,6 @@
</if>
</where>
GROUP BY sam.id
+ order by sam.id desc
</select>
</mapper>
diff --git a/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml b/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml
index e069196..e15e4aa 100644
--- a/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml
+++ b/src/main/resources/mapper/procurementrecord/ReturnManagementMapper.xml
@@ -39,6 +39,7 @@
and sl.sales_contract_no like concat('%',#{req.salesContractNo},'%')
</if>
</where>
+ order by rm.id desc
</select>
<select id="getReturnManagementDtoById" resultType="com.ruoyi.procurementrecord.bean.dto.ReturnManagementDto">
select rm.*,
diff --git a/src/main/resources/mapper/sales/SalesQuotationMapper.xml b/src/main/resources/mapper/sales/SalesQuotationMapper.xml
index 8036e2f..746e331 100644
--- a/src/main/resources/mapper/sales/SalesQuotationMapper.xml
+++ b/src/main/resources/mapper/sales/SalesQuotationMapper.xml
@@ -17,5 +17,6 @@
AND t1.status = #{salesQuotationDto.status}
</if>
</where>
+ order by t1.id desc
</select>
</mapper>
diff --git a/src/main/resources/mapper/technology/TechnologyOperationMapper.xml b/src/main/resources/mapper/technology/TechnologyOperationMapper.xml
index f6adc74..b09fdc2 100644
--- a/src/main/resources/mapper/technology/TechnologyOperationMapper.xml
+++ b/src/main/resources/mapper/technology/TechnologyOperationMapper.xml
@@ -32,6 +32,6 @@
and t.type = #{c.type}
</if>
</where>
- order by t.id asc
+ order by t.id desc
</select>
</mapper>
diff --git a/src/main/resources/mapper/technology/TechnologyOperationParamMapper.xml b/src/main/resources/mapper/technology/TechnologyOperationParamMapper.xml
index e1ccb2a..063f5aa 100644
--- a/src/main/resources/mapper/technology/TechnologyOperationParamMapper.xml
+++ b/src/main/resources/mapper/technology/TechnologyOperationParamMapper.xml
@@ -28,6 +28,6 @@
and top1.technology_param_id = #{paramId}
</if>
</where>
- order by top1.id asc
+ order by top1.id desc
</select>
</mapper>
--
Gitblit v1.9.3