调整排序

This commit is contained in:
xpecya 2024-12-15 16:25:22 +08:00
parent aa7a87822a
commit 44b8a3e7e8
1 changed files with 10 additions and 0 deletions

View File

@ -41,6 +41,16 @@ public class ColumnService {
*/ */
public PageObject<ColumnVO> queryColumn(Long parent, boolean needChildren, String keyword, public PageObject<ColumnVO> queryColumn(Long parent, boolean needChildren, String keyword,
Long exclude, int page, int size, String orderBy, String direction) { Long exclude, int page, int size, String orderBy, String direction) {
switch (orderBy) {
case "publishTime": {
orderBy = "publish_time";
break;
}
case "updateTime": {
orderBy = "update_time";
break;
}
}
List<Column> columns; List<Column> columns;
try { try {
columns = columnMapper.queryColumn(parent, keyword, exclude, orderBy, direction); columns = columnMapper.queryColumn(parent, keyword, exclude, orderBy, direction);