|
@@ -116,7 +116,6 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
|
|
|
* @param dictType 字典类型
|
|
|
* @return 字典类型
|
|
|
*/
|
|
|
- @Cacheable(cacheNames = CacheNames.SYS_DICT, key = "#dictType")
|
|
|
@Override
|
|
|
public SysDictType selectDictTypeByType(String dictType) {
|
|
|
return baseMapper.selectById(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType));
|
|
@@ -182,6 +181,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
|
|
|
public List<SysDictData> insertDictType(SysDictType dict) {
|
|
|
int row = baseMapper.insert(dict);
|
|
|
if (row > 0) {
|
|
|
+ // 新增 type 下无 data 数据 返回空防止缓存穿透
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
throw new ServiceException("操作失败");
|