gt 2 years ago
parent
commit
e4734a3b19

+ 49 - 0
chuanyi_server/src/main/java/com/judong/chuanyiserver/controller/ChannelSettingController.java

@@ -0,0 +1,49 @@
+package com.judong.chuanyiserver.controller;
+
+import com.judong.chuanyiserver.entity.ChannelSetting;
+import com.judong.chuanyiserver.enums.ResultEnum;
+import com.judong.chuanyiserver.service.ChannelSettingService;
+import com.judong.chuanyiserver.util.Blank;
+import com.judong.chuanyiserver.util.Result;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("channelSetting")
+@Slf4j
+public class ChannelSettingController {
+
+    @Resource
+    private ChannelSettingService channelSettingService;
+
+    @PostMapping("/channelSetting")
+    public Result channelSetting(@RequestBody ChannelSetting channelSetting) {
+        if (Blank.isEmpty(channelSetting, channelSetting.getServerId(), channelSetting.getChannelName())) {
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return channelSettingService.channelSetting(channelSetting);
+    }
+
+    @GetMapping("/getChannelSetting")
+    public Result getChannelSetting(@RequestBody ChannelSetting channelSetting) {
+        if (Blank.isEmpty(channelSetting, channelSetting.getServerId(), channelSetting.getChannelName())) {
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return channelSettingService.getChannelSetting(channelSetting.getServerId(), channelSetting.getChannelName());
+    }
+
+    @GetMapping("/getConnectTree")
+    public Result getConnectTree(Integer serverId) {
+        if (Blank.isEmpty(serverId)) {
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return channelSettingService.getConnectTree(serverId);
+    }
+
+    @PostMapping("/addChannelSettingList")
+    public Result addChannelSettingList() {
+        return null;
+    }
+}

+ 0 - 36
chuanyi_server/src/main/java/com/judong/chuanyiserver/controller/LabelSettingController.java

@@ -1,36 +0,0 @@
-package com.judong.chuanyiserver.controller;
-
-import com.judong.chuanyiserver.entity.LabelSetting;
-import com.judong.chuanyiserver.enums.ResultEnum;
-import com.judong.chuanyiserver.service.LabelSettingService;
-import com.judong.chuanyiserver.util.Blank;
-import com.judong.chuanyiserver.util.Result;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-
-@RestController
-@RequestMapping("labelSetting")
-@Slf4j
-public class LabelSettingController {
-
-    @Resource
-    private LabelSettingService labelSettingService;
-
-    @PostMapping("/labelSetting")
-    public Result labelSetting(@RequestBody LabelSetting labelSetting) {
-        if (Blank.isEmpty(labelSetting, labelSetting.getServerId(), labelSetting.getLabelName())) {
-            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
-        }
-        return labelSettingService.labelSetting(labelSetting);
-    }
-
-    @GetMapping("/getLabelSetting")
-    public Result getLabelSetting(@RequestBody LabelSetting labelSetting) {
-        if (Blank.isEmpty(labelSetting, labelSetting.getServerId(), labelSetting.getLabelName())) {
-            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
-        }
-        return labelSettingService.getLabelSetting(labelSetting.getServerId(), labelSetting.getLabelName());
-    }
-}

+ 20 - 0
chuanyi_server/src/main/java/com/judong/chuanyiserver/dao/ChannelSettingDao.java

@@ -0,0 +1,20 @@
+package com.judong.chuanyiserver.dao;
+
+import com.judong.chuanyiserver.entity.ChannelSetting;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface ChannelSettingDao {
+
+    ChannelSetting getChannelBySeChName(Integer serverId, String channelName);
+
+    Integer addChannelSetting(ChannelSetting channelSetting);
+
+    ChannelSetting getLabelByIdSeChName(Integer id, Integer serverId, String labelName);
+
+    Integer updateChannelSetting(ChannelSetting channelSetting);
+
+    List<String> getConfigList(int serverId);
+}

+ 0 - 16
chuanyi_server/src/main/java/com/judong/chuanyiserver/dao/LabelSettingDao.java

@@ -1,16 +0,0 @@
-package com.judong.chuanyiserver.dao;
-
-import com.judong.chuanyiserver.entity.LabelSetting;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface LabelSettingDao {
-
-    LabelSetting getLabelBySeLaName(Integer serverId, String labelName);
-
-    Integer addLabelSetting(LabelSetting labelSetting);
-
-    LabelSetting getLabelByIdSeLaName(Integer id, Integer serverId, String labelName);
-
-    Integer updateLabelSetting(LabelSetting labelSetting);
-}

+ 3 - 3
chuanyi_server/src/main/java/com/judong/chuanyiserver/entity/LabelSetting.java → chuanyi_server/src/main/java/com/judong/chuanyiserver/entity/ChannelSetting.java

@@ -5,7 +5,7 @@ import lombok.Data;
 import java.io.Serializable;
 
 @Data
-public class LabelSetting implements Serializable {
+public class ChannelSetting implements Serializable {
 
     private static final long serialVersionUID = -96536212774977561L;
 
@@ -20,11 +20,11 @@ public class LabelSetting implements Serializable {
     /**
      * 标签原始名称
      */
-    private String labelName;
+    private String channelName;
     /**
      * 标签映射名称
      */
-    private String labelMapName;
+    private String channelMapName;
     /**
      * 数据类型
      */

+ 13 - 0
chuanyi_server/src/main/java/com/judong/chuanyiserver/service/ChannelSettingService.java

@@ -0,0 +1,13 @@
+package com.judong.chuanyiserver.service;
+
+import com.judong.chuanyiserver.entity.ChannelSetting;
+import com.judong.chuanyiserver.util.Result;
+
+public interface ChannelSettingService {
+
+    Result channelSetting(ChannelSetting channelSetting);
+
+    Result getChannelSetting(Integer serverId,String ChannelName);
+
+    Result getConnectTree(Integer serverId);
+}

+ 0 - 11
chuanyi_server/src/main/java/com/judong/chuanyiserver/service/LabelSettingService.java

@@ -1,11 +0,0 @@
-package com.judong.chuanyiserver.service;
-
-import com.judong.chuanyiserver.entity.LabelSetting;
-import com.judong.chuanyiserver.util.Result;
-
-public interface LabelSettingService {
-
-    Result labelSetting(LabelSetting labelSetting);
-
-    Result getLabelSetting(Integer serverId,String labelName);
-}

+ 75 - 0
chuanyi_server/src/main/java/com/judong/chuanyiserver/service/impl/ChannelSettingServiceImpl.java

@@ -0,0 +1,75 @@
+package com.judong.chuanyiserver.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.judong.chuanyiserver.dao.ConnectDao;
+import com.judong.chuanyiserver.dao.ChannelSettingDao;
+import com.judong.chuanyiserver.entity.ChannelSetting;
+import com.judong.chuanyiserver.entity.ServerInformation;
+import com.judong.chuanyiserver.enums.ConnectModeEnum;
+import com.judong.chuanyiserver.enums.ResultEnum;
+import com.judong.chuanyiserver.service.ChannelSettingService;
+import com.judong.chuanyiserver.util.Blank;
+import com.judong.chuanyiserver.util.KepOpcServerUtil;
+import com.judong.chuanyiserver.util.Result;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+@Transactional
+public class ChannelSettingServiceImpl implements ChannelSettingService {
+
+    @Resource
+    private ConnectDao connectDao;
+
+    @Resource
+    private ChannelSettingDao channelSettingDao;
+
+    @Override
+    public synchronized Result channelSetting(ChannelSetting channelSetting) {
+        if (Blank.isEmpty(channelSetting.getId())) {
+            ChannelSetting isExistChannelSetting = channelSettingDao.getChannelBySeChName(channelSetting.getServerId(), channelSetting.getChannelName());
+            if (Blank.isNotEmpty(isExistChannelSetting)) {
+                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "已经存在此标签配置,请更换标签名称");
+            }
+            if (channelSettingDao.addChannelSetting(isExistChannelSetting) <= 0) {
+                return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "保存标签配置失败");
+            }
+            return Result.ok("保存标签配置成功");
+        } else {
+            ChannelSetting isExistChannelSetting = channelSettingDao.getLabelByIdSeChName(channelSetting.getId(), channelSetting.getServerId(), channelSetting.getChannelName());
+            if (Blank.isNotEmpty(isExistChannelSetting)) {
+                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "已经存在此标签配置,请更换标签名称");
+            }
+            if (channelSettingDao.updateChannelSetting(channelSetting) <= 0) {
+                return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "保存标签配置失败");
+            }
+            return Result.ok("保存标签配置成功");
+        }
+    }
+
+    @Override
+    public Result getChannelSetting(Integer serverId, String channelName) {
+        return Result.ok(channelSettingDao.getChannelBySeChName(serverId, channelName));
+    }
+
+    @Override
+    public Result getConnectTree(Integer serverId) {
+        ServerInformation serverInformation = connectDao.getServerInformationById(serverId);
+        if (Blank.isEmpty(serverInformation)) {
+            return Result.no(ResultEnum.NOT_FOUND.getRespCode(), ResultEnum.NOT_FOUND.getRespMsg());
+        }
+        if (serverInformation.getConnectMode() == ConnectModeEnum.KingOPCServer.getValue()) {
+            if (KepOpcServerUtil.validationServerInformation(serverInformation)) {
+                JSONObject jsonObject = new JSONObject();
+                List<JSONObject> jsonObjectList = KepOpcServerUtil.opcReadItemTree(serverInformation);
+                jsonObject.put("tree", jsonObjectList);
+                return Result.ok(jsonObject);
+            }
+            return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+        }
+        return null;
+    }
+}

+ 13 - 2
chuanyi_server/src/main/java/com/judong/chuanyiserver/service/impl/ConnectServiceImpl.java

@@ -1,6 +1,8 @@
 package com.judong.chuanyiserver.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.judong.chuanyiserver.dao.ConnectDao;
+import com.judong.chuanyiserver.dao.ChannelSettingDao;
 import com.judong.chuanyiserver.entity.ServerInformation;
 import com.judong.chuanyiserver.enums.ConnectModeEnum;
 import com.judong.chuanyiserver.enums.ResultEnum;
@@ -12,6 +14,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 @Service
 @Transactional
@@ -24,6 +27,9 @@ public class ConnectServiceImpl implements ConnectService {
     @Resource
     private UserUtil userUtil;
 
+    @Resource
+    private ChannelSettingDao channelSettingDao;
+
     @Override
     public Result testConnect(ServerInformation serverInformation) {
         try {
@@ -155,14 +161,19 @@ public class ConnectServiceImpl implements ConnectService {
         }
         serverInformation.setIpPassword(RSAUtil.decrypt(serverInformation.getIpPassword(), "utf-8"));
         //如果连接方式为kepserver
+        JSONObject jsonObject = new JSONObject();
+        List<String> configList = channelSettingDao.getConfigList(id);
+        jsonObject.put("config", configList);
         if (serverInformation.getConnectMode() == ConnectModeEnum.KEPOPCSERVER.getValue()) {
             if (KepOpcServerUtil.validationServerInformation(serverInformation)) {
-                return KepOpcServerUtil.opcReadItemTree(serverInformation);
+                jsonObject.put("tree", KepOpcServerUtil.opcReadItemTree(serverInformation));
+                return Result.ok(jsonObject);
             }
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
         } else if (serverInformation.getConnectMode() == ConnectModeEnum.KingOPCServer.getValue()) {
             if (OpcServerUaUtil.validationServerInformation(serverInformation)) {
-                return OpcServerUaUtil.opcReadItemTree(serverInformation);
+                jsonObject.put("tree", OpcServerUaUtil.opcReadItemTree(serverInformation));
+                return Result.ok(jsonObject);
             }
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
         } else {

+ 0 - 48
chuanyi_server/src/main/java/com/judong/chuanyiserver/service/impl/LabelSettingServiceImpl.java

@@ -1,48 +0,0 @@
-package com.judong.chuanyiserver.service.impl;
-
-import com.judong.chuanyiserver.dao.LabelSettingDao;
-import com.judong.chuanyiserver.entity.LabelSetting;
-import com.judong.chuanyiserver.enums.ResultEnum;
-import com.judong.chuanyiserver.service.LabelSettingService;
-import com.judong.chuanyiserver.util.Blank;
-import com.judong.chuanyiserver.util.Result;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.annotation.Resource;
-
-@Service
-@Transactional
-public class LabelSettingServiceImpl implements LabelSettingService {
-
-    @Resource
-    private LabelSettingDao labelSettingDao;
-
-    @Override
-    public synchronized Result labelSetting(LabelSetting labelSetting) {
-        if (Blank.isEmpty(labelSetting.getId())) {
-            LabelSetting isExistLabelSetting = labelSettingDao.getLabelBySeLaName(labelSetting.getServerId(), labelSetting.getLabelName());
-            if (Blank.isNotEmpty(isExistLabelSetting)) {
-                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "已经存在此标签配置,请更换标签名称");
-            }
-            if (labelSettingDao.addLabelSetting(labelSetting) <= 0) {
-                return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "保存标签配置失败");
-            }
-            return Result.ok("保存标签配置成功");
-        } else {
-            LabelSetting isExistLabelSetting = labelSettingDao.getLabelByIdSeLaName(labelSetting.getId(), labelSetting.getServerId(), labelSetting.getLabelName());
-            if (Blank.isNotEmpty(isExistLabelSetting)) {
-                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "已经存在此标签配置,请更换标签名称");
-            }
-            if (labelSettingDao.updateLabelSetting(labelSetting) <= 0) {
-                return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), "保存标签配置失败");
-            }
-            return Result.ok("保存标签配置成功");
-        }
-    }
-
-    @Override
-    public Result getLabelSetting(Integer serverId, String labelName) {
-        return Result.ok(labelSettingDao.getLabelBySeLaName(serverId, labelName));
-    }
-}

+ 7 - 7
chuanyi_server/src/main/java/com/judong/chuanyiserver/util/KepOpcServerUtil.java

@@ -5,6 +5,7 @@ import com.judong.chuanyiserver.config.KepOpcServerPoolFactory;
 import com.judong.chuanyiserver.entity.ServerInformation;
 import com.judong.chuanyiserver.enums.ConnectModeEnum;
 import com.judong.chuanyiserver.enums.ResultEnum;
+import com.judong.chuanyiserver.exception.CustomException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
 import org.jinterop.dcom.common.JIException;
@@ -163,25 +164,24 @@ public class KepOpcServerUtil {
      * @return
      * @throws Exception
      */
-    public static Result opcReadItemTree(ServerInformation serverInformation) {
+    public static List<JSONObject> opcReadItemTree(ServerInformation serverInformation) {
         try {
             String opcServerDaPoolKey = KepOpcServerUtil.generateOpcPoolKey(serverInformation);
             if (KepOpcServerUtil.validationKey(opcServerDaPoolKey)) {
                 Server server = KepOpcServerUtil.getServer(opcServerDaPoolKey);
                 if (null == server.getServerState()) {
-                    return Result.no(ResultEnum.NOT_FOUND.getRespCode(), "连接失败");
+                    throw new CustomException(ResultEnum.NOT_FOUND.getRespCode(), "连接失败");
                 }
                 if (OPCSERVERSTATE.OPC_STATUS_RUNNING == server.getServerState().getServerState()) {
-                    JSONObject jsonObject = new JSONObject();
-                    jsonObject.put("tree", generOpcTree(server));
+                    List<JSONObject> jsonObjectList = generOpcTree(server);
                     KepOpcServerUtil.returnServer(opcServerDaPoolKey, server);
-                    return Result.ok(jsonObject);
+                    return jsonObjectList;
                 }
             }
         } catch (Exception e) {
-            return Result.no(ResultEnum.REQUEST_TIME_OUT.getRespCode(), e.getMessage());
+            throw new CustomException(ResultEnum.REQUEST_TIME_OUT.getRespCode(), e.getMessage());
         }
-        return Result.no(ResultEnum.SERVER_ERROR.getRespCode(), ResultEnum.SERVER_ERROR.getRespMsg());
+        throw new CustomException(ResultEnum.SERVER_ERROR.getRespCode(), ResultEnum.SERVER_ERROR.getRespMsg());
     }
 
     public static Result closeConnect(ServerInformation serverInformation) {

+ 7 - 7
chuanyi_server/src/main/java/com/judong/chuanyiserver/util/OpcServerUaUtil.java

@@ -6,6 +6,7 @@ import com.judong.chuanyiserver.config.OpcServerUaPoolFactory;
 import com.judong.chuanyiserver.entity.ServerInformation;
 import com.judong.chuanyiserver.enums.ConnectModeEnum;
 import com.judong.chuanyiserver.enums.ResultEnum;
+import com.judong.chuanyiserver.exception.CustomException;
 import lombok.extern.slf4j.Slf4j;
 import org.eclipse.milo.opcua.sdk.client.OpcUaClient;
 import org.eclipse.milo.opcua.sdk.client.api.config.OpcUaClientConfig;
@@ -231,19 +232,18 @@ public class OpcServerUaUtil {
         }
     }
 
-    public static Result opcReadItemTree(ServerInformation serverInformation) {
+    public static List<JSONObject> opcReadItemTree(ServerInformation serverInformation) {
         try {
             String opcServerDaPoolKey = OpcServerUaUtil.generateOpcPoolKey(serverInformation);
             if (!OpcServerUaUtil.validationKey(opcServerDaPoolKey)) {
-                return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
+                throw new CustomException(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), ResultEnum.REQUEST_WRONGPARAMS.getRespMsg());
             }
             OpcUaClient opcUaClient = OpcServerUaUtil.getClient(opcServerDaPoolKey);
-            JSONObject jsonObject = new JSONObject();
-            jsonObject.put("tree", generOpcUaTree(opcUaClient, null));
+            List<JSONObject> jsonObjectList = generOpcUaTree(opcUaClient, null);
             OpcServerUaUtil.returnClient(opcServerDaPoolKey, opcUaClient);
-            return Result.ok(jsonObject);
+            return jsonObjectList;
         } catch (Exception e) {
-            return Result.no(ResultEnum.REQUEST_TIME_OUT.getRespCode(), e.getMessage());
+            throw new CustomException(ResultEnum.REQUEST_TIME_OUT.getRespCode(), e.getMessage());
         }
     }
 
@@ -262,7 +262,7 @@ public class OpcServerUaUtil {
             String opcServerDaPoolKey = OpcServerUaUtil.generateOpcPoolKey(serverInformation);
             if (OpcServerUaUtil.validationKey(opcServerDaPoolKey)) {
                 OpcUaClient opcUaClient = OpcServerUaUtil.getClient(opcServerDaPoolKey);
-                if (Blank.isEmpty(opcUaClient)){
+                if (Blank.isEmpty(opcUaClient)) {
                     return Result.no(ResultEnum.REQUEST_TIME_OUT.getRespCode(), "客户端创建失败");
                 }
                 //chuangyi.以太网<192.168.0.1>.$DeviceStatusOfts

+ 24 - 18
chuanyi_server/src/main/resources/mapper/LabelSettingDao.xml → chuanyi_server/src/main/resources/mapper/ChannelSettingDao.xml

@@ -1,19 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.judong.chuanyiserver.dao.LabelSettingDao">
+<mapper namespace="com.judong.chuanyiserver.dao.ChannelSettingDao">
 
-    <insert id="addLabelSetting">
-        insert into t_label_setting(server_id, label_name, lable_map_name, data_type, read_mechanism, read_policy,
+    <insert id="addChannelSetting">
+        insert into t_channel_setting(server_id, channel_name, channel_map_name, data_type, read_mechanism, read_policy,
                                     policy_value, configuration_name, create_time)
-            value (#{serverId}, #{labelName},
-                   #{labelMapName}, #{dataType},
+            value (#{serverId}, #{channelName},
+                   #{channelMapName}, #{dataType},
                    #{readMechanism}, #{readPolicy},
                    #{policyValue}, #{configurationName}, now())
     </insert>
 
-    <update id="updateLabelSetting">
-        update t_label_setting
-        set lable_map_name=#{labelMapName},
+    <update id="updateChannelSetting">
+        update t_channel_setting
+        set channel_map_name=#{channelMapName},
             data_type=#{labelMapName},
             read_mechanism=#{labelMapName},
             read_policy=#{labelMapName},
@@ -21,37 +21,43 @@
         where id = #{id}
     </update>
 
-    <select id="getLabelBySeLaName" resultType="com.judong.chuanyiserver.entity.LabelSetting">
+    <select id="getChannelBySeChName" resultType="com.judong.chuanyiserver.entity.ChannelSetting">
         select id,
                server_id,
-               label_name,
-               lable_map_name,
+               channel_name,
+               channel_map_name,
                data_type,
                read_mechanism,
                read_policy,
                policy_value,
                configuration_name,
                create_time
-        from t_label_setting
+        from t_channel_setting
         where server_id = #{serverId}
-          and label_name = #{labelName}
+          and channel_name = #{channelName}
     </select>
 
-    <select id="getLabelByIdSeLaName" resultType="com.judong.chuanyiserver.entity.LabelSetting">
+    <select id="getLabelByIdSeChName" resultType="com.judong.chuanyiserver.entity.ChannelSetting">
         select id,
                server_id,
-               label_name,
-               lable_map_name,
+               channel_name,
+               channel_map_name,
                data_type,
                read_mechanism,
                read_policy,
                policy_value,
                configuration_name,
                create_time
-        from t_label_setting
+        from t_channel_setting
         where server_id = #{serverId}
-          and label_name = #{labelName}
+          and channel_name = #{channelName}
           and id != #{id}
     </select>
 
+    <select id="getConfigList" resultType="java.lang.String">
+        select configuration_name
+        from t_channel_setting
+        order by create_time
+    </select>
+
 </mapper>