fix:排序

上级 e4b5e39e
...@@ -45,7 +45,6 @@ public class CsdnUserController { ...@@ -45,7 +45,6 @@ public class CsdnUserController {
pageParm.setCurrent(query.getPage()); pageParm.setCurrent(query.getPage());
pageParm.setSize(query.getPageSize()); pageParm.setSize(query.getPageSize());
QueryWrapper<CsdnUserInfo> wrapper = new QueryWrapper<>(); QueryWrapper<CsdnUserInfo> wrapper = new QueryWrapper<>();
wrapper.orderByDesc("user_weight");
wrapper.eq("is_delete", 0); wrapper.eq("is_delete", 0);
if (StringUtils.isNotEmpty(userName)) { if (StringUtils.isNotEmpty(userName)) {
wrapper.eq("user_name", userName); wrapper.eq("user_name", userName);
...@@ -68,6 +67,8 @@ public class CsdnUserController { ...@@ -68,6 +67,8 @@ public class CsdnUserController {
if (StringUtils.isNotEmpty(nickName)) { if (StringUtils.isNotEmpty(nickName)) {
wrapper.like("nick_name", 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))); return Result.ok(CsdnUserInfoDTO.Converter.INSTANCE.from(this.csdnUserInfoService.page(pageParm, wrapper)));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册