首页>代码> ssm+activiti+shiro+lucene+layui设计的流程网站管理后台系统>/ruyi/src/main/java/com/java1234/controller/admin/ConfigAdminController.java
package com.java1234.controller.admin;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.google.gson.Gson;
import com.java1234.entity.Config;
import com.java1234.entity.Result;
import com.java1234.service.ConfigService;
import com.java1234.util.ResponseUtil;

@Controller
@RequestMapping("/admin/config")
public class ConfigAdminController {
	
	
	@Resource
	private ConfigService configService;
	
	
	@RequestMapping("/update")
	public String update(Config config,HttpServletResponse response,Integer flag)throws Exception{
		int resultTotal=0;
		resultTotal=configService.update(config);
		Result result=new Result();
		Gson g = new Gson();
		if(resultTotal>0){
			result.setSuccess(true); 
			result.setMsg("修改成功.");
		}else{
			result.setSuccess(false); 
			result.setMsg("修改失败.");
		}
		ResponseUtil.write(response, g.toJson(result));
		return null;
	}
	
	
	
	@RequestMapping("/findById")
	public String list(@RequestParam(value="id",required=false)String id,HttpServletResponse response)throws Exception{
		Config config = configService.findById(Integer.parseInt(id));
		Gson gson = new Gson();
		ResponseUtil.write(response, gson.toJson(config));
		return null;
	}
	
	
	
	
	
	
}
最近下载更多
lcqlcl  LV11 2023年8月29日
LITIANYU084414  LV11 2023年1月4日
testuser1234567  LV24 2022年7月21日
fenbo666  LV5 2022年6月5日
wanglinddad  LV54 2022年4月6日
tiansitong  LV14 2022年3月20日
chengqiang  LV13 2022年2月15日
893213895  LV18 2021年12月20日
xpangpang  LV2 2021年11月30日
wzzhou0208  LV7 2021年10月14日
最近浏览更多
wwvvvzz 1月9日
暂无贡献等级
lilong007  LV20 2023年12月30日
haitianjiaoyu0  LV6 2023年11月21日
1790759671 2023年11月1日
暂无贡献等级
只要有你  LV8 2023年10月19日
泓鼎168  LV19 2023年10月16日
2036495585  LV9 2023年10月15日
lcqlcl  LV11 2023年8月29日
肖建  LV8 2023年8月15日
dzlwindy  LV8 2023年7月3日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友