xuhy
2023-04-03 bec9ef7332b0c0d1afc9b28918748efc63a60bcc
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java
@@ -148,6 +148,12 @@
            }
            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);
@@ -234,6 +240,38 @@
    }
    /**
     * 修改价格规则开关
     */
    @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}")