| | |
| | | } |
| | | objects.add(jsonObject1); |
| | | } |
| | | |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObj = JSONObject.parseObject(config.getContent()); |
| | | Integer zcOne = jsonObj.getInteger("num1"); |
| | | model.addAttribute("zcOne",zcOne); |
| | | model.addAttribute("array",objects); |
| | | JSONObject extraCost = JSONObject.parseObject(jsonObject.getString("ExtraCost")); |
| | | model.addAttribute("ExtraCost",extraCost); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改价格规则开关 |
| | | */ |
| | | @RequestMapping(value = "/openOrClose") |
| | | @ResponseBody |
| | | public Object openOrClose(Integer num1) { |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(config.getContent()); |
| | | jsonObject.remove(jsonObject.getString("num1")); |
| | | jsonObject.put("num1",num1); |
| | | config.setContent(JSONObject.toJSONString(jsonObject)); |
| | | tSystemConfigService.updateById(config); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改启动页状态 |
| | | */ |
| | | @RequestMapping(value = "/updateStartState") |
| | | @ResponseBody |
| | | public Object updateStartState(Integer num2) { |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(config.getContent()); |
| | | jsonObject.remove(jsonObject.getString("num2")); |
| | | jsonObject.put("num2",num2); |
| | | config.setContent(JSONObject.toJSONString(jsonObject)); |
| | | tSystemConfigService.updateById(config); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tSystemConfigId}") |