From e1cc0d03fadc2d251d36c0dc3650f75e830d5363 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 07 四月 2022 19:12:42 +0800
Subject: [PATCH] 功能完善

---
 app/src/main/java/com/yeshi/makemoney/app/controller/admin/config/SystemConfigAdminController.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/app/src/main/java/com/yeshi/makemoney/app/controller/admin/config/SystemConfigAdminController.java b/app/src/main/java/com/yeshi/makemoney/app/controller/admin/config/SystemConfigAdminController.java
index 77f299a..e8283b8 100644
--- a/app/src/main/java/com/yeshi/makemoney/app/controller/admin/config/SystemConfigAdminController.java
+++ b/app/src/main/java/com/yeshi/makemoney/app/controller/admin/config/SystemConfigAdminController.java
@@ -3,6 +3,7 @@
 import com.google.gson.*;
 import com.yeshi.makemoney.app.entity.config.SystemConfig;
 import com.yeshi.makemoney.app.entity.config.SystemConfigKey;
+import com.yeshi.makemoney.app.entity.config.SystemConfigType;
 import com.yeshi.makemoney.app.service.inter.config.SystemConfigService;
 import com.yeshi.makemoney.app.service.query.config.SystemConfigQuery;
 import com.yeshi.makemoney.app.vo.AcceptAdminData;
@@ -35,8 +36,8 @@
     @ResponseBody
     @RequestMapping("list")
     public String list(SystemConfigQuery query, int page, int limit, String callback) {
-        List<SystemConfig> list = systemConfigService.list(query, page, limit);
-        long count = systemConfigService.count(query);
+        List<SystemConfig> list = systemConfigService.listByType(SystemConfigType.common);
+        long count = list.size();
         JSONObject data = new JSONObject();
         Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new JsonSerializer<Date>() {
 
@@ -95,10 +96,12 @@
     public String getKeyList() {
         JSONArray array = new JSONArray();
         for (SystemConfigKey key : SystemConfigKey.values()) {
-            JSONObject data = new JSONObject();
-            data.put("key", key.name());
-            data.put("value", key.getDesc());
-            array.add(data);
+            if (key.getType() == SystemConfigType.common) {
+                JSONObject data = new JSONObject();
+                data.put("key", key.name());
+                data.put("value", key.getDesc());
+                array.add(data);
+            }
         }
         return JsonUtil.loadTrueResult(array);
     }

--
Gitblit v1.8.0