From e49bf101514c87934f0863cd4bdf36fa75ca4e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E8=8B=B1=E6=9D=B0?= <327782001@qq.com> Date: Wed, 25 Oct 2023 18:17:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kwan/springbootkwan/controller/CsdnUserController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/kwan/springbootkwan/controller/CsdnUserController.java b/src/main/java/com/kwan/springbootkwan/controller/CsdnUserController.java index 59e19bb..8d20888 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))); } -- GitLab