123
This commit is contained in:
@@ -2,6 +2,7 @@ package com.ruoyi.cai.manager;
|
||||
|
||||
import com.ruoyi.cai.constant.RedisConstant;
|
||||
import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||
import com.ruoyi.cai.enums.systemconfig.SystemCheckResp;
|
||||
import com.ruoyi.common.core.service.SensitiveService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -127,8 +128,15 @@ public class SystemConfigManager {
|
||||
}
|
||||
|
||||
|
||||
public void setSystemConfig(SystemConfigEnum systemConfig,String value){
|
||||
public SystemCheckResp setSystemConfig(SystemConfigEnum systemConfig,String value){
|
||||
if(systemConfig.getCheck() != null){
|
||||
SystemCheckResp check = systemConfig.getCheck().check(value);
|
||||
if(!check.isSuccess()){
|
||||
return check;
|
||||
}
|
||||
}
|
||||
this.set(systemConfig.name(),value);
|
||||
return SystemCheckResp.ok();
|
||||
}
|
||||
|
||||
public void set(String key, String value) {
|
||||
|
||||
Reference in New Issue
Block a user