refactor: 修改缓存排序.

This commit is contained in:
lijiahang
2023-12-27 15:20:14 +08:00
parent fda6085cc8
commit 6d1ffd43b4
5 changed files with 11 additions and 2 deletions

View File

@@ -34,6 +34,7 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@@ -180,6 +181,7 @@ public class SystemUserServiceImpl implements SystemUserService {
// 转换
return list.stream()
.map(SystemUserConvert.MAPPER::to)
.sorted(Comparator.comparing(SystemUserVO::getId))
.collect(Collectors.toList());
}