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 bd3b1c61..8174be81 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 @@ -2026,6 +2026,7 @@ public class ResourceServiceImpl extends CrudServiceImpl { + Map index = (Map) x; + int type_index = index.containsKey("type_index") ? (int) index.get("type_index") : Integer.MAX_VALUE; + return type_index; + }).reversed()).collect(Collectors.toList()); } @Override diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 2d2207bc..4039a769 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1639,7 +1639,22 @@ SELECT - tdr.id, - tdr.NAME, - tdr.create_date + tdr.id, + tdr.NAME, + tdr.create_date FROM - tb_data_resource tdr + tb_data_resource tdr WHERE - 1 = 1 - AND tdr.del_flag = 0 - AND tdr.dept_id = #{deptId} - - AND tdr.name like CONCAT('%', #{key}, '%') - + 1 = 1 + AND tdr.del_flag = 0 + AND tdr.dept_id = #{deptId} + + AND tdr.name like CONCAT('%', #{key}, '%') + ORDER BY create_date DESC