add 新增 StringUtils splitTo 与 splitList 方法 优化业务代码

This commit is contained in:
疯狂的狮子li
2023-02-06 15:50:32 +08:00
parent 6c460e6ca8
commit 2039aa4cb4
16 changed files with 287 additions and 235 deletions

View File

@@ -87,8 +87,8 @@ public class PageQuery implements Serializable {
// 兼容前端排序类型
isAsc = StringUtils.replaceEach(isAsc, new String[]{"ascending", "descending"}, new String[]{"asc", "desc"});
String[] orderByArr = orderBy.split(",");
String[] isAscArr = isAsc.split(",");
String[] orderByArr = orderBy.split(StringUtils.SEPARATOR);
String[] isAscArr = isAsc.split(StringUtils.SEPARATOR);
if (isAscArr.length != 1 && isAscArr.length != orderByArr.length) {
throw new ServiceException("排序参数有误");
}