From 7cebdcbbbbb2ddcb18a3948f256f3fd1c76ce03f Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期六, 06 五月 2023 18:46:01 +0800
Subject: [PATCH] 启用冻结修改
---
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java
index 3242865..4599961 100644
--- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TSystemConfigController.java
+++ b/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}")
--
Gitblit v1.7.1