diff --git a/src/main/java/com/kwan/springbootkwan/controller/CsdnUserController.java b/src/main/java/com/kwan/springbootkwan/controller/CsdnUserController.java index 59e19bb19f3cc86485a86bca39bcf4c64da25701..8d20888f5067adf708d26b1fafaacd0e03581804 100644 --- a/src/main/java/com/kwan/springbootkwan/controller/CsdnUserController.java +++ b/src/main/java/com/kwan/springbootkwan/controller/CsdnUserController.java @@ -45,7 +45,6 @@ public class CsdnUserController { pageParm.setCurrent(query.getPage()); pageParm.setSize(query.getPageSize()); QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.orderByDesc("user_weight"); wrapper.eq("is_delete", 0); if (StringUtils.isNotEmpty(userName)) { wrapper.eq("user_name", userName); @@ -68,6 +67,8 @@ public class CsdnUserController { if (StringUtils.isNotEmpty(nickName)) { wrapper.like("nick_name", nickName); } + wrapper.orderByDesc("user_weight"); + wrapper.orderByDesc("update_time"); return Result.ok(CsdnUserInfoDTO.Converter.INSTANCE.from(this.csdnUserInfoService.page(pageParm, wrapper))); }