fix(system):修复字典更新逻辑中的代码冲突
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.youlai.boot.system.controller;
|
||||
|
||||
import com.youlai.boot.common.result.Result;
|
||||
import com.youlai.boot.core.web.Result;
|
||||
import com.youlai.boot.system.service.UserOnlineService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
@@ -52,4 +52,4 @@ public class UserOnlineController {
|
||||
"count", userOnlineService.getOnlineUserCount()
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,11 +116,7 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements Di
|
||||
throw new BusinessException("字典不存在");
|
||||
}
|
||||
// 校验 code 是否唯一
|
||||
<<<<<<< HEAD
|
||||
String dictCode = dictForm.getCode();
|
||||
=======
|
||||
String dictCode = dictForm.getDictCode();
|
||||
>>>>>>> 95412501fc69777ad7db6fef970b479c9651984d
|
||||
if (!entity.getDictCode().equals(dictCode)) {
|
||||
long count = this.count(new LambdaQueryWrapper<Dict>()
|
||||
.eq(Dict::getDictCode, dictCode)
|
||||
@@ -130,9 +126,6 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements Di
|
||||
// 更新字典
|
||||
Dict dict = dictConverter.toEntity(dictForm);
|
||||
dict.setId(id);
|
||||
<<<<<<< HEAD
|
||||
return this.updateById(dict);
|
||||
=======
|
||||
boolean result = this.updateById(dict);
|
||||
if (result) {
|
||||
// 更新字典数据
|
||||
@@ -152,7 +145,6 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements Di
|
||||
}
|
||||
}
|
||||
return result;
|
||||
>>>>>>> 95412501fc69777ad7db6fef970b479c9651984d
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user