From f39e7de8be43eda95560f49982b6cd0345e24404 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 09 六月 2025 10:28:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java |   12 ++++++------
 ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml                    |   10 +++++++++-
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java
index 2c10d0e..0470a9d 100644
--- a/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java
+++ b/ruoyi-service/ruoyi-admin/src/main/java/com/ruoyi/admin/controller/FranchiseeController.java
@@ -777,12 +777,12 @@
         wrapper.eq(Franchisee::getIsDelete, 0).orderByDesc(Franchisee::getCreateTime);
         Page<Franchisee> page = wrapper.page(Page.of(dto.getPageNum(), dto.getPageSize()));
         for (Franchisee record : page.getRecords()) {
-                if (record.getSiteIds()!=null){
-                    String[] split = record.getSiteIds().split(",");
-                    List<Site> list = siteService.lambdaQuery().in(Site::getId, split).list();
-                        //用 , 拼接
-                    record.setSiteStr(list.stream().map(Site::getSiteName).collect(Collectors.joining(",")));
-                }
+            if (record.getSiteIds()!=null){
+                String[] split = record.getSiteIds().split(",");
+                List<Site> list = siteService.lambdaQuery().in(Site::getId, split).list();
+                //用 , 拼接
+                record.setSiteStr(list.stream().map(Site::getSiteName).collect(Collectors.joining(",")));
+            }
 
 
         }
diff --git a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
index 3bf74dc..4a07bf8 100644
--- a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
+++ b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -388,7 +388,15 @@
                 and DATE(o.complete_time) <![CDATA[ <= ]]> #{data.completeTimeEnd}
             </if>
         </where>
-        order by o.createTime desc
+        <if test="data.completeType != null and data.completeType == 1">
+            order by o.complete_time
+        </if>
+        <if test="data.completeType != null and data.completeType == 2">
+            order by o.complete_time desc
+        </if>
+        <if test="data.completeType == null">
+            order by o.createTime desc
+        </if>
     </select>
 
     <select id="excelExportList" resultMap="BaseResultMap">

--
Gitblit v1.7.1