Jelajahi Sumber

增加排序

caoyang 6 bulan lalu
induk
melakukan
c8ac02150d

+ 3 - 1
yudao-module-safe/yudao-module-safe-biz/src/main/java/cn/iocoder/yudao/module/safe/dal/mysql/camera/SafeCameraMapper.java

@@ -28,7 +28,9 @@ public interface SafeCameraMapper extends BaseMapperX<SafeCameraDO> {
     }
 
     default List<SafeCameraDO> selectByServerId(Long serverId) {
-        return selectList("server_id",serverId);
+        return selectList(new LambdaQueryWrapperX<SafeCameraDO>()
+                .eq(SafeCameraDO::getServerId, serverId)
+                .orderByDesc(SafeCameraDO::getSort));
     }
 
 }