|
|
@ -25,7 +25,7 @@ public class DictDataServiceImpl extends ServiceImpl<DictDataDao, DictData> impl |
|
|
throw new RuntimeException("字典数据为空"); |
|
|
throw new RuntimeException("字典数据为空"); |
|
|
} |
|
|
} |
|
|
// 设置为默认值 |
|
|
// 设置为默认值 |
|
|
List<DictData> list =isDefault(dictData); |
|
|
|
|
|
|
|
|
List<DictData> list = isDefault(dictData); |
|
|
if (null != list && !list.isEmpty()){ |
|
|
if (null != list && !list.isEmpty()){ |
|
|
throw new RuntimeException("字典键值重复"); |
|
|
throw new RuntimeException("字典键值重复"); |
|
|
} |
|
|
} |
|
|
@ -60,7 +60,7 @@ public class DictDataServiceImpl extends ServiceImpl<DictDataDao, DictData> impl |
|
|
// throw new RuntimeException("当前字典已存在默认值"); |
|
|
// throw new RuntimeException("当前字典已存在默认值"); |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
lambdaUpdate().set(DictData::getIsDefault, Constant.SYSTEM_ACTIVE_YES).eq(DictData::getDictType,dictData.getDictType()).eq(DictData::getSite,dictData.getSite()).update(); |
|
|
|
|
|
|
|
|
lambdaUpdate().set(DictData::getIsDefault, Constant.SYSTEM_ACTIVE_NO).eq(DictData::getDictType,dictData.getDictType()).eq(DictData::getSite,dictData.getSite()).update(); |
|
|
} |
|
|
} |
|
|
if (!StringUtils.hasText(dictData.getDictType())){ |
|
|
if (!StringUtils.hasText(dictData.getDictType())){ |
|
|
throw new RuntimeException("字典类型为空"); |
|
|
throw new RuntimeException("字典类型为空"); |
|
|
|