lipenghui пре 2 месеци
родитељ
комит
951c015cfe

+ 1 - 1
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/object/PageUtils.java

@@ -32,7 +32,7 @@ public class PageUtils {
      * @return 排序字段
      */
     public static <T> SortingField buildSortingField(Func1<T, ?> func) {
-        return buildSortingField(func, SortingField.ORDER_DESC);
+        return buildSortingField(func, SortingField.ORDER_ASC);
     }
 
     /**

+ 2 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/vo/IotDeviceRespVO.java

@@ -170,5 +170,6 @@ public class IotDeviceRespVO {
 
     @Schema(description = "负责人姓名 逗号分隔")
     private String responsibleNames;
-
+    @Schema(description = "排序字段")
+    private Integer sortColumn;
 }

+ 1 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/dal/mysql/IotDeviceMapper.java

@@ -53,7 +53,7 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
                 .eqIfPresent(IotDeviceDO::getInfoRemark, reqVO.getInfoRemark())
                 .eqIfPresent(IotDeviceDO::getInfoUrl, reqVO.getInfoUrl())
                 .eqIfPresent(IotDeviceDO::getTemplateJson, reqVO.getTemplateJson())
-                .orderByDesc(IotDeviceDO::getId));
+                .orderByAsc(IotDeviceDO::getSortColumn));
     }
 
     default List<IotDeviceDO> selectSimpleList(Collection<Long> deptIds) {