|
@@ -579,7 +579,7 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- @Cacheable(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0")
|
|
|
|
|
|
+ @Cacheable(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0", unless = "#result == null")
|
|
public SysConfig addSysConfigCache(String key) {
|
|
public SysConfig addSysConfigCache(String key) {
|
|
return sysConfigService.getOne(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getConfigKey, key));
|
|
return sysConfigService.getOne(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getConfigKey, key));
|
|
}
|
|
}
|
|
@@ -591,7 +591,7 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- @CachePut(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0", condition = "#result != null")
|
|
|
|
|
|
+ @CachePut(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0", unless = "#result == null")
|
|
public SysConfig updateSysConfigCache(String key) {
|
|
public SysConfig updateSysConfigCache(String key) {
|
|
return sysConfigService.getById(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getConfigKey, key));
|
|
return sysConfigService.getById(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getConfigKey, key));
|
|
}
|
|
}
|
|
@@ -615,7 +615,7 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- @Cacheable(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0 + '-' + #p1")
|
|
|
|
|
|
+ @Cacheable(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0 + '-' + #p1", unless = "#result == null")
|
|
public SysConfig addSysConfigCache(Long schoolId, String key) {
|
|
public SysConfig addSysConfigCache(Long schoolId, String key) {
|
|
return sysConfigService.getOne(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getSchoolId, schoolId).eq(SysConfig::getConfigKey, key));
|
|
return sysConfigService.getOne(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getSchoolId, schoolId).eq(SysConfig::getConfigKey, key));
|
|
}
|
|
}
|
|
@@ -628,7 +628,7 @@ public class CommonCacheServiceImpl implements CommonCacheService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- @CachePut(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0 + '-' + #p1", condition = "#result != null")
|
|
|
|
|
|
+ @CachePut(value = SystemConstant.SYS_CONFIG_CACHE, key = "#p0 + '-' + #p1", unless = "#result != null")
|
|
public SysConfig updateSysConfigCache(Long schoolId, String key) {
|
|
public SysConfig updateSysConfigCache(Long schoolId, String key) {
|
|
return sysConfigService.getOne(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getSchoolId, schoolId).eq(SysConfig::getConfigKey, key));
|
|
return sysConfigService.getOne(new QueryWrapper<SysConfig>().lambda().eq(SysConfig::getSchoolId, schoolId).eq(SysConfig::getConfigKey, key));
|
|
}
|
|
}
|