Browse Source

用户列表优化

wangtianteng 11 months ago
parent
commit
43e0dc987b

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserInfoServiceImpl.java

@@ -30,6 +30,7 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
          LambdaQueryWrapper<UserInfo> queryWrapper =  new LambdaQueryWrapper<UserInfo>();
          queryWrapper.like(StringUtils.isNotEmpty(param),UserInfo::getUserPhone,param);
          queryWrapper.eq(UserInfo::getDelFlag,0);
+        queryWrapper.orderByDesc(UserInfo::getCreateTime);
         return this.baseMapper.selectPage(page,queryWrapper);
     }
 }

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/platform/UserInfoMapper.xml

@@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             GROUP BY b.user_id
         ) c ON a.id = c.user_id
         WHERE a.del_flag = 0
+        order by a.create_time desc
     </select>