Commit f34eb9c9e6b61b596d0085e9a2baec48628b23e1

Authored by Lawrence
1 parent 8a4e915f

通道查询排序输出,避免列表杂乱无章

src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
@@ -63,6 +63,7 @@ public interface DeviceChannelMapper { @@ -63,6 +63,7 @@ public interface DeviceChannelMapper {
63 " WHERE 1=1 " + 63 " WHERE 1=1 " +
64 " <if test=\"hasSubChannel == true\" > AND subCount >0</if>" + 64 " <if test=\"hasSubChannel == true\" > AND subCount >0</if>" +
65 " <if test=\"hasSubChannel == false\" > AND subCount=0</if>" + 65 " <if test=\"hasSubChannel == false\" > AND subCount=0</if>" +
  66 + " ORDER BY channelId ASC" +
66 " </script>"}) 67 " </script>"})
67 List<DeviceChannel> queryChannelsByDeviceId(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online); 68 List<DeviceChannel> queryChannelsByDeviceId(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online);
68 69
@@ -96,6 +97,7 @@ public interface DeviceChannelMapper { @@ -96,6 +97,7 @@ public interface DeviceChannelMapper {
96 " <if test=\"hasSubChannel!= null and hasSubChannel == false\" > AND subCount=0</if> " + 97 " <if test=\"hasSubChannel!= null and hasSubChannel == false\" > AND subCount=0</if> " +
97 " <if test=\"platformId != null and inPlatform == true \" > AND platformId='${platformId}'</if> " + 98 " <if test=\"platformId != null and inPlatform == true \" > AND platformId='${platformId}'</if> " +
98 " <if test=\"platformId != null and inPlatform == false \" > AND (platformId != '${platformId}' OR platformId is NULL ) </if> " + 99 " <if test=\"platformId != null and inPlatform == false \" > AND (platformId != '${platformId}' OR platformId is NULL ) </if> " +
  100 + " ORDER BY deviceId, channelId ASC" +
99 " </script>"}) 101 " </script>"})
100 102
101 List<ChannelReduce> queryChannelListInAll(String query, Boolean online, Boolean hasSubChannel, String platformId, Boolean inPlatform); 103 List<ChannelReduce> queryChannelListInAll(String query, Boolean online, Boolean hasSubChannel, String platformId, Boolean inPlatform);