【代码优化】排序:字段驼峰改为下划线
This commit is contained in:
parent
d08cc2f533
commit
454370f3ed
|
@ -37,7 +37,7 @@ public class MyBatisUtils {
|
|||
// 排序字段
|
||||
if (!CollectionUtil.isEmpty(sortingFields)) {
|
||||
page.addOrder(sortingFields.stream().map(sortingField -> SortingField.ORDER_ASC.equals(sortingField.getOrder()) ?
|
||||
OrderItem.asc(sortingField.getField()) : OrderItem.desc(sortingField.getField()))
|
||||
OrderItem.asc(StrUtil.toUnderlineCase(sortingField.getField())) : OrderItem.desc(StrUtil.toUnderlineCase(sortingField.getField())))
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
return page;
|
||||
|
|
Loading…
Reference in New Issue