| | |
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.core.text.Convert;
|
| | | import com.ruoyi.common.exception.CustomException;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | | import com.ruoyi.common.utils.StringUtils;
|
| | | import com.ruoyi.framework.redis.RedisCache;
|
| | | import com.ruoyi.project.system.domain.SysConfig;
|
| | |
| | | *
|
| | | * @return true开启,false关闭
|
| | | */
|
| | | @Override
|
| | | public boolean selectCaptchaOnOff()
|
| | | {
|
| | | String captchaOnOff = selectConfigByKey("sys.account.captchaOnOff");
|
| | |
| | | SysConfig config = selectConfigById(configId);
|
| | | if (StringUtils.equals(UserConstants.YES, config.getConfigType()))
|
| | | {
|
| | | throw new CustomException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
|
| | | throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
|
| | | }
|
| | | configMapper.deleteConfigById(configId);
|
| | | redisCache.deleteObject(getCacheKey(config.getConfigKey()));
|