|
@@ -39,7 +39,8 @@ public class DictServiceImpl extends ServiceImpl<IDictMapper, Dict> implements I
|
|
}
|
|
}
|
|
LambdaQueryWrapper<Dict> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<Dict> wrapper = new LambdaQueryWrapper<>();
|
|
wrapper.eq(Dict::getDictKey,dictKey);
|
|
wrapper.eq(Dict::getDictKey,dictKey);
|
|
- wrapper.eq(Dict::getSysUserId, StpUtil.getLoginId());
|
|
|
|
|
|
+ wrapper.and(e -> e.eq(Dict::getSysUserId,StpUtil.getLoginId()).or().eq(Dict::getIsSystem,1));
|
|
|
|
+ //wrapper.eq(Dict::getSysUserId, StpUtil.getLoginId());
|
|
wrapper.orderByAsc(Dict::getSort);
|
|
wrapper.orderByAsc(Dict::getSort);
|
|
wrapper.orderByDesc(Dict::getId);
|
|
wrapper.orderByDesc(Dict::getId);
|
|
return list(wrapper);
|
|
return list(wrapper);
|
|
@@ -55,7 +56,9 @@ public class DictServiceImpl extends ServiceImpl<IDictMapper, Dict> implements I
|
|
if(StringUtils.isNotBlank(param.getDictName())){
|
|
if(StringUtils.isNotBlank(param.getDictName())){
|
|
wrapper.like(Dict::getDictName,param.getDictName());
|
|
wrapper.like(Dict::getDictName,param.getDictName());
|
|
}
|
|
}
|
|
- wrapper.eq(Dict::getSysUserId, StpUtil.getLoginId());
|
|
|
|
|
|
+ wrapper.and(e -> e.eq(Dict::getSysUserId,StpUtil.getLoginId()).or().eq(Dict::getIsSystem,1));
|
|
|
|
+
|
|
|
|
+ //wrapper.eq(Dict::getSysUserId, StpUtil.getLoginId());
|
|
wrapper.orderByAsc(Dict::getSort);
|
|
wrapper.orderByAsc(Dict::getSort);
|
|
wrapper.orderByDesc(Dict::getId);
|
|
wrapper.orderByDesc(Dict::getId);
|
|
Page<Dict> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
|
|
Page<Dict> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
|
|
@@ -75,6 +78,10 @@ public class DictServiceImpl extends ServiceImpl<IDictMapper, Dict> implements I
|
|
if(dict.getId() == null){
|
|
if(dict.getId() == null){
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
}
|
|
}
|
|
|
|
+ Dict byId = this.getById(dict.getId());
|
|
|
|
+ if(byId != null && byId.getIsSystem() == 1){
|
|
|
|
+ throw new BusinessException(ResultCode.DEL_ERROR);
|
|
|
|
+ }
|
|
dictFileService.updateDictId(dict.getId(),null);
|
|
dictFileService.updateDictId(dict.getId(),null);
|
|
this.removeById(dict.getId());
|
|
this.removeById(dict.getId());
|
|
|
|
|