微调
This commit is contained in:
@@ -52,7 +52,7 @@ public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> i
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean addDictTree(DictTreeParam dictTreeParam) {
|
||||
checkRepeat(dictTreeParam,false);
|
||||
//checkRepeat(dictTreeParam,false);
|
||||
boolean result;
|
||||
DictTree dictTree = new DictTree();
|
||||
BeanUtils.copyProperties(dictTreeParam, dictTree);
|
||||
@@ -75,7 +75,7 @@ public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> i
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean updateDictTree(DictTreeParam.UpdateParam param) {
|
||||
checkRepeat(param,true);
|
||||
//checkRepeat(param,true);
|
||||
boolean result;
|
||||
DictTree dictTree = new DictTree();
|
||||
BeanUtils.copyProperties(param, dictTree);
|
||||
@@ -171,7 +171,7 @@ public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> i
|
||||
private void checkRepeat(DictTreeParam dictTreeParam,boolean isExcludeSelf){
|
||||
LambdaQueryWrapper<DictTree> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(DictTree::getCode, dictTreeParam.getCode())
|
||||
.eq(DictTree::getState, DataStateEnum.ENABLE.getCode());
|
||||
.eq(DictTree::getState, DictConst.ENABLE);
|
||||
if(isExcludeSelf){
|
||||
if(dictTreeParam instanceof DictTreeParam.UpdateParam){
|
||||
wrapper.ne(DictTree::getId, ((DictTreeParam.UpdateParam) dictTreeParam).getId());
|
||||
|
||||
Reference in New Issue
Block a user