Search in sources :

Example 1 with ConstantFormVo

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;
}
Also used : ConstantFormVo(com.code.server.login.vo.ConstantFormVo) DemoChecker(com.code.server.login.anotation.DemoChecker) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

DemoChecker (com.code.server.login.anotation.DemoChecker)1 ConstantFormVo (com.code.server.login.vo.ConstantFormVo)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1