【代码优化】排序:字段驼峰改为下划线

This commit is contained in:
jinmh716 2024-10-17 20:19:56 +08:00
parent d08cc2f533
commit 454370f3ed
1 changed files with 1 additions and 1 deletions

View File

@ -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;