首页>代码>SpringMVC+Spring+mybatis+mysql+jsp微信商城系统,有后台管理系统>/chihaodian/src/com/weixin/controller/WxSettingController.java
package com.weixin.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.google.gson.Gson;
import com.weixin.entity.Button;
import com.weixin.entity.WxSetting;
import com.weixin.service.WxSettingService;
@Controller
@RequestMapping
public class WxSettingController {
@Autowired
private WxSettingService wxSettingService;
Map<String,Object> map = new HashMap<String, Object>();
Gson gson = new Gson();
@ResponseBody
@RequestMapping(value="/main/wxSettingUpdate.html")
public String update(WxSetting wxSetting){
wxSetting.setId(1);
int rs = wxSettingService.updateByPrimaryKeySelective(wxSetting);
if(rs!=1){
map.put("message","update button error!");
}
map.put("rs", rs);
return gson.toJson(map);
}
@RequestMapping(value="/main/wxSettingList.html")
public ModelAndView getList(ModelAndView ml){
ml.addObject("list",wxSettingService.selectByPrimaryKey(1));
ml.setViewName("main/setting/info");
return ml ;
}
// public WxSetting getSetting(){
// return wxSettingService.selectByPrimaryKey(1);
// }
}
最近下载更多
lilitu LV6
2024年5月30日
wuying8208 LV15
2023年9月4日
lvllvl LV4
2023年7月18日
tangyongheng08 LV6
2023年6月13日
lilonghui LV3
2023年5月17日
泓鼎168 LV20
2023年5月10日
jimodeai LV15
2023年4月4日
liangju666 LV6
2023年3月14日
liuhongbing123 LV5
2022年11月23日
PaymentCodeSystem LV11
2022年6月9日

最近浏览