From 72c49f3afa22c4f84760d57001e45a4fadf2d482 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期四, 12 三月 2026 09:32:33 +0800
Subject: [PATCH] #升级JDK17

---
 src/main/java/com/zy/system/controller/ConfigController.java |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/main/java/com/zy/system/controller/ConfigController.java b/src/main/java/com/zy/system/controller/ConfigController.java
index bb3a753..edcde86 100644
--- a/src/main/java/com/zy/system/controller/ConfigController.java
+++ b/src/main/java/com/zy/system/controller/ConfigController.java
@@ -2,8 +2,8 @@
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
-import com.baomidou.mybatisplus.plugins.Page;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.core.annotations.ManagerAuth;
 import com.core.common.Cools;
 import com.core.common.DateUtils;
@@ -29,7 +29,7 @@
     @RequestMapping(value = "/config/{id}/auth")
     @ManagerAuth
     public R get(@PathVariable("id") Long id) {
-        return R.ok(configService.selectById(String.valueOf(id)));
+        return R.ok(configService.getById(String.valueOf(id)));
     }
 
     @RequestMapping(value = "/config/list/auth")
@@ -40,21 +40,21 @@
                   @RequestParam(required = false)String orderByType,
                   @RequestParam Map<String, Object> param){
         excludeTrash(param);
-        EntityWrapper<Config> wrapper = new EntityWrapper<>();
+        QueryWrapper<Config> wrapper = new QueryWrapper<>();
         convert(param, wrapper);
-        wrapper.orderBy("id", false);
-        return R.ok(configService.selectPage(new Page<>(curr, limit), wrapper));
+        wrapper.orderBy(true, false, "id");
+        return R.ok(configService.page(new Page<>(curr, limit), wrapper));
     }
 
     @RequestMapping(value = "/config/listAll/auth")
     @ManagerAuth
     public R listAll(){
-        EntityWrapper<Config> wrapper = new EntityWrapper<>();
-        wrapper.orderBy("id", false);
-        return R.ok(configService.selectList(wrapper));
+        QueryWrapper<Config> wrapper = new QueryWrapper<>();
+        wrapper.orderBy(true, false, "id");
+        return R.ok(configService.list(wrapper));
     }
 
-    private void convert(Map<String, Object> map, EntityWrapper wrapper){
+    private void convert(Map<String, Object> map, QueryWrapper wrapper){
         for (Map.Entry<String, Object> entry : map.entrySet()){
             if (entry.getKey().endsWith(">")) {
                 wrapper.ge(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
@@ -78,7 +78,7 @@
             }
         }
         if (null == config.getId()){
-            configService.insert(config);
+            configService.save(config);
         } else {
             configService.updateById(config);
             Parameter.reset();
@@ -94,7 +94,7 @@
                 return R.error("json瑙f瀽澶辫触");
             }
         }
-        configService.insert(config);
+        configService.save(config);
         return R.ok();
     }
 
@@ -120,7 +120,7 @@
         if (Cools.isEmpty(ids)){
             return R.error();
         }
-        configService.deleteBatchIds(Arrays.asList(ids));
+        configService.removeByIds(Arrays.asList(ids));
         return R.ok();
     }
 
@@ -128,19 +128,19 @@
     @ManagerAuth
     public R export(@RequestBody JSONObject param){
         List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
-        EntityWrapper<Config> wrapper = new EntityWrapper<>();
+        QueryWrapper<Config> wrapper = new QueryWrapper<>();
         Map<String, Object> map = excludeTrash(param.getJSONObject("config"));
         convert(map, wrapper);
-        List<Config> list = configService.selectList(wrapper);
+        List<Config> list = configService.list(wrapper);
         return R.ok(exportSupport(list, fields));
     }
 
     @RequestMapping(value = "/configQuery/auth")
     @ManagerAuth
     public R query(String condition) {
-        EntityWrapper<Config> wrapper = new EntityWrapper<>();
+        QueryWrapper<Config> wrapper = new QueryWrapper<>();
         wrapper.like("id", condition);
-        Page<Config> page = configService.selectPage(new Page<>(0, 10), wrapper);
+        Page<Config> page = configService.page(new Page<>(0, 10), wrapper);
         List<Map<String, Object>> result = new ArrayList<>();
         for (Config config : page.getRecords()){
             Map<String, Object> map = new HashMap<>();
@@ -173,10 +173,10 @@
     @RequestMapping(value = "/config/getSelectTypes")
     @ManagerAuth
     public R getSelectTypes() {
-        EntityWrapper<Config> wrapper = new EntityWrapper<>();
-        wrapper.setSqlSelect("DISTINCT select_type as selectType");
+        QueryWrapper<Config> wrapper = new QueryWrapper<>();
+        wrapper.select("DISTINCT select_type as selectType");
         wrapper.isNotNull("select_type");
-        List<Map<String, Object>> maps = configService.selectMaps(wrapper);
+        List<Map<String, Object>> maps = configService.listMaps(wrapper);
         List<String> types = new ArrayList<>();
         for (Map<String, Object> map : maps) {
             if (map != null && map.get("selectType") != null) {

--
Gitblit v1.9.1