新增支持导出数据字段排序

This commit is contained in:
RuoYi
2020-02-17 12:16:13 +08:00
parent b5678994da
commit 6ce34b1790
2 changed files with 18 additions and 1 deletions

View File

@ -63,6 +63,19 @@ public class BaseController
}
}
/**
* 设置请求排序数据
*/
protected void startOrderBy()
{
PageDomain pageDomain = TableSupport.buildPageRequest();
if (StringUtils.isNotEmpty(pageDomain.getOrderBy()))
{
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
PageHelper.orderBy(orderBy);
}
}
/**
* 获取request
*/