forked from github/dataease
Merge pull request #7316 from dataease/pr@dev@fix_chinese_sort_error
fix: 过滤器中文排序出现空项报错
This commit is contained in:
commit
38a4e5b39d
@ -91,6 +91,7 @@ public class DirectFieldService implements DataSetFieldService {
|
||||
|
||||
return CollectionUtil.sort(list, (v1, v2) -> {
|
||||
Collator instance = Collator.getInstance(Locale.CHINESE);
|
||||
if (ObjectUtils.isEmpty(v1) || ObjectUtils.isEmpty(v2)) return 0;
|
||||
if (StringUtils.equals("desc", sortStr)) {
|
||||
return instance.compare(v2, v1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user