增加 Spring Cache 框架

This commit is contained in:
YunaiV
2022-04-03 13:23:00 +08:00
parent 3263b0ab5b
commit 49b906bbfe
14 changed files with 115 additions and 37 deletions

View File

@ -1 +0,0 @@
package cn.iocoder.yudao.module.system.dal.dataobject;

View File

@ -15,12 +15,14 @@ import java.util.List;
public interface DeptMapper extends BaseMapperX<DeptDO> {
default List<DeptDO> selectList(DeptListReqVO reqVO) {
return selectList(new LambdaQueryWrapperX<DeptDO>().likeIfPresent(DeptDO::getName, reqVO.getName())
return selectList(new LambdaQueryWrapperX<DeptDO>()
.likeIfPresent(DeptDO::getName, reqVO.getName())
.eqIfPresent(DeptDO::getStatus, reqVO.getStatus()));
}
default DeptDO selectByParentIdAndName(Long parentId, String name) {
return selectOne(new LambdaQueryWrapper<DeptDO>().eq(DeptDO::getParentId, parentId)
return selectOne(new LambdaQueryWrapper<DeptDO>()
.eq(DeptDO::getParentId, parentId)
.eq(DeptDO::getName, name));
}

View File

@ -41,7 +41,7 @@ public class LoginUserRedisDAO {
}
private static String formatKey(String sessionId) {
return String.format(LOGIN_USER.getKeyTemplate(), sessionId);
return LOGIN_USER.formatKey(sessionId);
}
}