debug:并发情况下,缓存多存很多信息
This commit is contained in:
parent
2f0a51b5c8
commit
130a4a6cbf
|
@ -194,12 +194,12 @@ public class AttachClassifyServiceImpl implements AttachClassifyService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AttachClassifyNameVO> selectAllNameList(){
|
public List<AttachClassifyNameVO> selectAllNameList(){
|
||||||
List<AttachClassifyNameVO> list = redisCache.getCacheList(CacheConstants.ATTACH_CLASSIFY_NAME_LIST);
|
List<AttachClassifyNameVO> list = redisCache.getCacheObject(CacheConstants.ATTACH_CLASSIFY_NAME_LIST);
|
||||||
if(CollectionUtils.isEmptyElement(list)){
|
if(CollectionUtils.isEmptyElement(list)){
|
||||||
PageHelper.orderBy("bac.sort asc");
|
PageHelper.orderBy("bac.sort asc");
|
||||||
list = attachClassifyMapper.selectNameList(new AttachClassifyQuery());
|
list = attachClassifyMapper.selectNameList(new AttachClassifyQuery());
|
||||||
if (CollectionUtils.isNotEmptyElement(list)) {
|
if (CollectionUtils.isNotEmptyElement(list)) {
|
||||||
redisCache.setCacheList(CacheConstants.ATTACH_CLASSIFY_NAME_LIST, list);
|
redisCache.setCacheObject(CacheConstants.ATTACH_CLASSIFY_NAME_LIST, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -142,11 +142,11 @@ public class ProjectServiceImpl implements ProjectService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProjectNameVO> selectAllNameList() {
|
public List<ProjectNameVO> selectAllNameList() {
|
||||||
List<ProjectNameVO> list = redisCache.getCacheList(CacheConstants.PROJECT_NAME_LIST);
|
List<ProjectNameVO> list = redisCache.getCacheObject(CacheConstants.PROJECT_NAME_LIST);
|
||||||
if (CollectionUtils.isEmptyElement(list)) {
|
if (CollectionUtils.isEmptyElement(list)) {
|
||||||
list = projectMapper.selectNameList(new ProjectQuery());
|
list = projectMapper.selectNameList(new ProjectQuery());
|
||||||
if (CollectionUtils.isNotEmptyElement(list)) {
|
if (CollectionUtils.isNotEmptyElement(list)) {
|
||||||
redisCache.setCacheList(CacheConstants.PROJECT_NAME_LIST, list);
|
redisCache.setCacheObject(CacheConstants.PROJECT_NAME_LIST, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|
|
@ -722,13 +722,13 @@ public class UserServiceImpl implements UserService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysUserNameVO> selectAllUserNameList() {
|
public List<SysUserNameVO> selectAllUserNameList() {
|
||||||
List<SysUserNameVO> list = redisCache.getCacheList(CacheConstants.USER_NAME_LIST);
|
List<SysUserNameVO> list = redisCache.getCacheObject(CacheConstants.USER_NAME_LIST);
|
||||||
if (CollectionUtils.isEmptyElement(list)) {
|
if (CollectionUtils.isEmptyElement(list)) {
|
||||||
SysUserQuery query = new SysUserQuery();
|
SysUserQuery query = new SysUserQuery();
|
||||||
query.setExcludeUserId(1L);
|
query.setExcludeUserId(1L);
|
||||||
list = userMapper.selectNameList(query);
|
list = userMapper.selectNameList(query);
|
||||||
if (CollectionUtils.isNotEmptyElement(list)) {
|
if (CollectionUtils.isNotEmptyElement(list)) {
|
||||||
redisCache.setCacheList(CacheConstants.USER_NAME_LIST, list);
|
redisCache.setCacheObject(CacheConstants.USER_NAME_LIST, list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user