This commit is contained in:
caozehui
2024-12-25 19:13:51 +08:00
parent 9706c91c3f
commit c4443c5669
5 changed files with 37 additions and 12 deletions

View File

@@ -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());