|
@@ -51,18 +51,18 @@ class SysDicServiceImpl : ServiceImpl<SysDicMapper, SysDic>(), ISysDicService {
|
|
|
|
|
|
// @CacheEvict(CACHEKEYS.SYS, key = "'dic_key_' + #sysDic.key")
|
|
|
@Suppress("UNCHECKED_CAST")
|
|
|
- override fun modifySysDic(sysDic: SysDic): SysDic {
|
|
|
- baseMapper.updateById(sysDic)
|
|
|
+ override fun modifySysDic(data: SysDic): SysDic {
|
|
|
+ baseMapper.updateById(data)
|
|
|
// 更新缓存
|
|
|
val cache = cacheManager.getCache(CACHEKEYS.SYS)
|
|
|
val cachedList: MutableList<SysDic>? = cache[CACHE_KEY_ALL].get() as MutableList<SysDic>
|
|
|
cachedList?.let {
|
|
|
- it.removeIf { it.id == sysDic.id }
|
|
|
- it.add(sysDic)
|
|
|
+ it.removeIf { it.id == data.id }
|
|
|
+ it.add(data)
|
|
|
cache.put(CACHE_KEY_ALL, cachedList)
|
|
|
}
|
|
|
|
|
|
- return sysDic
|
|
|
+ return data
|
|
|
}
|
|
|
|
|
|
override fun getOneByKey(key: String, value: String?, sort: Int?): SysDic? {
|