From e51668cc4daeff15d8f8f63630e21ccb8ea30761 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 12 Aug 2022 16:58:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResourceServiceImpl.java | 13 +++- .../resources/mapper/resource/ResourceDao.xml | 65 ++++++++++--------- 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 14134861..7c4ca376 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -389,7 +389,18 @@ public class ResourceServiceImpl extends CrudServiceImpl resultPage = new Page<>(pageNum, pageSize); switch (Constant.ProjectPlace.getByFlag(projectPlace)) { diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 8159225e..ce212c04 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -128,8 +128,7 @@ AND user_id = #{dto.creator} GROUP BY id) taa2 ON tdr.id = taa2.resource_id LEFT JOIN ( SELECT resource_id, COUNT( approve_status ) approve_status FROM t_ability_application WHERE 1 = 1 - AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id - = + AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id = taa3.resource_id LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id WHERE 1 = 1 @@ -184,10 +183,13 @@ ) - ORDER BY ${orderField} ${orderType} - , pin_top_time DESC + ORDER BY ${orderField} ${orderType}, pin_top_time DESC + + ORDER BY sd.type, sd.sort + + ORDER BY ${orderField} ${orderType} @@ -401,8 +403,7 @@ AND user_id = #{dto.creator} GROUP BY id) taa2 ON tdr.id = taa2.resource_id LEFT JOIN ( SELECT resource_id, COUNT( approve_status ) approve_status FROM t_ability_application WHERE 1 = 1 - AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id - = + AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id = taa3.resource_id LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id WHERE 1 = 1 @@ -447,10 +448,13 @@ - ORDER BY ${orderField} ${orderType} - , pin_top_time DESC + ORDER BY ${orderField} ${orderType}, pin_top_time DESC + + ORDER BY sd.type, sd.sort + + ORDER BY ${orderField} ${orderType} LIMIT ${pageNum}, ${pageSize} @@ -578,8 +582,7 @@ FROM ( SELECT - ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS - "type", + ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS "type", sd.NAME AS "deptName", IFNULL( tdr.deptCount, 0 ) AS "deptCount", sd.id AS "deptId", @@ -610,8 +613,7 @@ FROM ( SELECT - ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS - "type", + ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS "type", IFNULL( tdr.deptCount, 0 ) AS "deptCount" FROM sys_dept sd @@ -649,8 +651,7 @@ FROM ( SELECT - ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS - "type", + ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS "type", IFNULL( tdr.deptCount, 0) AS "deptCount", IFNULL(sr.name, '暂无该地区') AS "districtName" FROM @@ -1480,7 +1481,7 @@ \ No newline at end of file