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 45c9dd29..98257b25 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -132,8 +132,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 @@ -188,10 +187,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} @@ -405,8 +407,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 @@ -451,10 +452,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} @@ -582,8 +586,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", @@ -614,8 +617,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 @@ -653,8 +655,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 @@ -1484,7 +1485,7 @@ \ No newline at end of file