|
@@ -5,6 +5,7 @@ import com.ssj.framework.basic.common.bean.SplitPage;
|
|
|
import com.ssj.framework.basic.config.bean.Config;
|
|
|
import com.ssj.framework.basic.config.service.ConfigService;
|
|
|
import com.ssj.framework.core.common.controller.BaseController;
|
|
|
+import com.ssj.framework.core.security.manager.TokenManager;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -27,6 +28,8 @@ import java.util.Map;
|
|
|
public class ConfigController extends BaseController {
|
|
|
@Autowired
|
|
|
private ConfigService configService;
|
|
|
+ @Autowired
|
|
|
+ private TokenManager tokenManager;
|
|
|
|
|
|
@RequestMapping("/list")
|
|
|
public String list(Model model,
|
|
@@ -52,14 +55,14 @@ public class ConfigController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 系统参数编辑页面
|
|
|
- * @param request
|
|
|
- * @param response
|
|
|
+ * @param
|
|
|
+ * @param
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/edit")
|
|
|
public String edit(Model model, @RequestParam( defaultValue = "id")String id) throws Exception{
|
|
|
Config config= configService.getById(id);
|
|
|
- if(config ==null) config = new Config();
|
|
|
+ if(config ==null) {config = new Config();}
|
|
|
model.addAttribute("config", config);
|
|
|
return "sys/config/edit";
|
|
|
}
|
|
@@ -70,14 +73,15 @@ public class ConfigController extends BaseController {
|
|
|
Response response = new Response();
|
|
|
config=configService.save(config);
|
|
|
configService.clearConfigCache();
|
|
|
+ tokenManager.setString(config.getParamCode(),config.getParamVal());
|
|
|
response.success(config);
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除系统参数
|
|
|
- * @param request
|
|
|
- * @param response
|
|
|
+ * @param
|
|
|
+ * @param
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|