lwhhszx 2 years ago
parent
commit
8c8df5b2fe

+ 2 - 2
RMS/src/main/java/cn/cslg/report/common/config/InnerInterceptor/LizzMybatisIntercepts.java

@@ -107,8 +107,8 @@ public class LizzMybatisIntercepts implements InnerInterceptor {
                             }
                         }
                         // 根据sql语句结构,将拼接sql放入合适的位置
-                        if (Localsql.contains("order by")) {
-                            Localsql = Localsql.replace("order by", "And (" + sqls + ") order by");
+                        if (Localsql.contains("ORDER BY")) {
+                            Localsql = Localsql.replace("ORDER BY", "And (" + sqls + ") ORDER BY");
                         }
                         else if (Localsql.contains("LIMIT")) {
                             Localsql = Localsql.replace("LIMIT", "And (" + sqls + ") LIMIT");

+ 1 - 0
RMS/src/main/java/cn/cslg/report/service/business/ReportService.java

@@ -127,6 +127,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
         if (reportVO.getSignPatentNo() != null && reportVO.getSignPatentNo() != "") {
             queryWrapper.like(Report::getSignPatentNo, reportVO.getSignPatentNo());
         }
+        queryWrapper.orderByDesc(Report::getCreateTime);
         //分页
         if (reportVO.getSize() != null && reportVO.getCurrent() != null) {
             SecurityUtils.startDataScope("/pcs/report/query");

BIN
RMS/target/classes/cn/cslg/report/service/business/ReportDocumentService.class


BIN
RMS/target/classes/cn/cslg/report/service/business/ReportService.class