fix: 优化排序逻辑
This commit is contained in:
parent
8a6c319933
commit
ac1498b4b2
@ -85,7 +85,7 @@ public class MsThreedRoamMServiceImpl extends ServiceImpl<MsThreedRoamMMapper, M
|
||||
|
||||
private String buildThreedRoamMQgcOrderBySql(List<DataSourceRequest.SortDescriptor> sorts) {
|
||||
if (CollUtil.isEmpty(sorts)) {
|
||||
return " ORDER BY r.tm DESC NULLS LAST, r.stcd ASC, r.name ASC";
|
||||
return " ORDER BY a.CODE ASC";
|
||||
}
|
||||
List<String> orderByParts = new ArrayList<>();
|
||||
for (DataSourceRequest.SortDescriptor sort : sorts) {
|
||||
@ -100,7 +100,7 @@ public class MsThreedRoamMServiceImpl extends ServiceImpl<MsThreedRoamMMapper, M
|
||||
orderByParts.add(column + " " + direction + " NULLS LAST");
|
||||
}
|
||||
if (orderByParts.isEmpty()) {
|
||||
return " ORDER BY r.tm DESC NULLS LAST, r.stcd ASC, r.name ASC";
|
||||
return " ORDER BY a.CODE ASC";
|
||||
}
|
||||
return " ORDER BY " + String.join(", ", orderByParts);
|
||||
}
|
||||
@ -167,6 +167,7 @@ public class MsThreedRoamMServiceImpl extends ServiceImpl<MsThreedRoamMMapper, M
|
||||
case "rvcd" -> "a.RVCD";
|
||||
case "remark" -> "a.REMARK";
|
||||
case "modifyTime" -> "a.MODIFY_TIME";
|
||||
case "recordTime" -> "a.RECORD_TIME";
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user