|
|
@@ -138,6 +138,12 @@ public class DictionaryDataService extends BaseService<DictionaryData> {
|
|
|
)
|
|
|
public ResponseResultVO<?> update(DictionaryDataVO dictionaryDataVO) {
|
|
|
DictionaryData dictionaryData = dictionaryDataConvert.convertToPo(dictionaryDataVO);
|
|
|
+ // 同类型名称不允许重复
|
|
|
+ Long count = dictionaryDataMapper.checkValueDuplicated(dictionaryData);
|
|
|
+ if(count > 0){
|
|
|
+ throw new BaseBusinessException(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.ISEXISTS_DATAVALUE.getMessage());
|
|
|
+ }
|
|
|
+ // 根据Id查询当前数据
|
|
|
DictionaryData dictionaryDataItem = dictionaryDataMapper.selectById(dictionaryDataVO.getDataId());
|
|
|
if (dictionaryDataItem.getSysCode() != null) {
|
|
|
//系统预制 无法编辑
|