refactor 优化,一样效果,减少一行代码

This commit is contained in:
cxh 2024-12-11 18:09:00 +08:00
parent 3aabcef901
commit 74c37f774e

View File

@ -118,8 +118,7 @@ public class SysLogininforServiceImpl implements ISysLogininforService {
.between(params.get("beginTime") != null && params.get("endTime") != null,
SysLogininfor::getLoginTime, params.get("beginTime"), params.get("endTime"));
if (StringUtils.isBlank(pageQuery.getOrderByColumn())) {
pageQuery.setOrderByColumn("info_id");
pageQuery.setIsAsc("desc");
lqw.orderByDesc(SysLogininfor::getInfoId);
}
Page<SysLogininforVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
return TableDataInfo.build(page);