|
@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.system;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+
|
|
|
|
|
+import jdk.nashorn.api.scripting.AbstractJSObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -24,7 +26,7 @@ import com.ruoyi.system.service.ISysConfigService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 参数配置 信息操作处理
|
|
* 参数配置 信息操作处理
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
* @author ruoyi
|
|
* @author ruoyi
|
|
|
*/
|
|
*/
|
|
|
@RestController
|
|
@RestController
|
|
@@ -88,7 +90,10 @@ public class SysConfigController extends BaseController
|
|
|
return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
|
return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
|
|
}
|
|
}
|
|
|
config.setCreateBy(getUsername());
|
|
config.setCreateBy(getUsername());
|
|
|
- return toAjax(configService.insertConfig(config));
|
|
|
|
|
|
|
+ configService.insertConfig(config);
|
|
|
|
|
+
|
|
|
|
|
+ configService.resetConfigCache();
|
|
|
|
|
+ return AjaxResult.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -104,7 +109,10 @@ public class SysConfigController extends BaseController
|
|
|
return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
|
return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
|
|
}
|
|
}
|
|
|
config.setUpdateBy(getUsername());
|
|
config.setUpdateBy(getUsername());
|
|
|
- return toAjax(configService.updateConfig(config));
|
|
|
|
|
|
|
+ configService.updateConfig(config);
|
|
|
|
|
+
|
|
|
|
|
+ configService.resetConfigCache();
|
|
|
|
|
+ return AjaxResult.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -116,6 +124,7 @@ public class SysConfigController extends BaseController
|
|
|
public AjaxResult remove(@PathVariable Long[] configIds)
|
|
public AjaxResult remove(@PathVariable Long[] configIds)
|
|
|
{
|
|
{
|
|
|
configService.deleteConfigByIds(configIds);
|
|
configService.deleteConfigByIds(configIds);
|
|
|
|
|
+ configService.resetConfigCache();
|
|
|
return success();
|
|
return success();
|
|
|
}
|
|
}
|
|
|
|
|
|