use of com.code.server.login.vo.ConstantFormVo in project summer by foxsugar.
the class DemoAction method modifyConstnat.
@DemoChecker
@RequestMapping("/uConstant")
public AgentResponse modifyConstnat(@RequestParam("constantForm") String constantForm) {
Map<String, Object> rs = JsonUtil.readValue(constantForm, Map.class);
ConstantFormVo vo = JsonUtil.readValue(constantForm, ConstantFormVo.class);
Constant constant = constantDao.findOne(1l);
constant.setInitMoney(vo.getInit_money());
constant.setAppleCheck(Integer.valueOf(vo.getApple_check()).intValue());
constant.setVersionOfAndroid(vo.getVersion_of_android());
constant.setVersionOfIos(vo.getVersion_of_ios());
constant.setMarquee(vo.getMarquee());
constant.setMarquee1(vo.getMarquee1());
constant.setMarquee2(vo.getMarquee2());
constant.setDownload2(vo.getDownload2());
constant.setDownload(vo.getDownload());
constantDao.save(constant);
// 刷新内存
ServerManager.constant = constantDao.findOne(1L);
AgentResponse agentResponse = new AgentResponse();
return agentResponse;
}
Aggregations