webPageHelper新增纯排序方法,配置表排序方法优化

This commit is contained in:
lhc
2021-05-14 15:06:51 +08:00
parent f9abf9638f
commit ff1cb3b15d
2 changed files with 6 additions and 0 deletions

View File

@@ -12,4 +12,8 @@ public class MyPageHelper {
PageHelper.startPage(webPageInfo.getPageNum(), webPageInfo.getPageSize());
}
}
public static void orderBy(String sortField,String order){
PageHelper.orderBy(sortField+" "+order);
}
}

View File

@@ -1,5 +1,6 @@
package com.hcframe.base.module.tableconfig.service.impl;
import com.github.pagehelper.PageHelper;
import com.hcframe.base.common.ResultVO;
import com.hcframe.base.common.WebPageInfo;
import com.hcframe.base.common.utils.MyPageHelper;
@@ -260,6 +261,7 @@ public class TableConfigServiceImpl implements TableConfigService {
@Override
@Transactional(rollbackFor = Exception.class)
public ResultVO fieldSort(Integer tableId) {
MyPageHelper.orderBy("ORDER_ID","ASC");
List<OsSysField> list = osSysFieldDao.select(OsSysField.builder().tableId(tableId).build());
for (int i = 0; i < list.size(); i++) {
OsSysField osSysField = list.get(i);