Эх сурвалжийг харах

fix: sip管理修复
1. 修复sip配置编辑新增功能

kindring 1 жил өмнө
parent
commit
222e6c54a1

+ 15 - 0
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SipUserConfig.java

@@ -123,4 +123,19 @@ public class SipUserConfig {
         }
         return enableBind.equals("1");
     }
+
+    @Override
+    public String toString() {
+        return "SipUserConfig{" +
+                "id='" + id + '\'' +
+                ", adminId='" + adminId + '\'' +
+                ", sipDomain='" + sipDomain + '\'' +
+                ", serverId='" + serverId + '\'' +
+                ", password='" + password + '\'' +
+                ", description='" + description + '\'' +
+                ", enable='" + enable + '\'' +
+                ", enableBind='" + enableBind + '\'' +
+                ", createTime='" + createTime + '\'' +
+                '}';
+    }
 }

+ 8 - 8
src/main/java/com/genersoft/iot/vmp/storager/dao/SipConfigMapper.java

@@ -32,7 +32,7 @@ public interface SipConfigMapper {
             "enableBind," +
             "createTime" +
             ") VALUES (" +
-            "'#{sipDomain}', " +
+            "#{sipDomain}, " +
             "#{serverId}, " +
             "#{password}, " +
             "#{description}, " +
@@ -53,15 +53,15 @@ public interface SipConfigMapper {
 
     // 更新sip规则
     @Update("UPDATE sip_config SET " +
-            "sipDomain = '#{sipUserConfig.sipDomain}', " +
-            "serverId = #{sipUserConfig.serverId}, " +
-            "password = #{sipUserConfig.password}, " +
-            "description = #{sipUserConfig.description}, " +
-            "enable = #{sipUserConfig.enable}, " +
-            "enableBind = #{sipUserConfig.enableBind} " +
+            "sipDomain = #{SipUserConfig.sipDomain}, " +
+            "serverId = #{SipUserConfig.serverId}, " +
+            "password = #{SipUserConfig.password}, " +
+            "description = #{SipUserConfig.description}, " +
+            "enable = #{SipUserConfig.enable}, " +
+            "enableBind = #{SipUserConfig.enableBind} " +
             "WHERE id = #{SipId}"
     )
-    int updateSipConfig(@Param("sipUserConfig") SipUserConfig sipUserConfig, @Param("SipId") String SipId);
+    int updateSipConfig(@Param("SipUserConfig") SipUserConfig sipUserConfig, @Param("SipId") String SipId);
 
 
     // 查询根据域获取对应的sip配置

+ 1 - 0
src/main/java/com/genersoft/iot/vmp/vmanager/server/sipController.java

@@ -93,6 +93,7 @@ public class sipController {
         if (!StpAdminUtil.hasRole("primary") && oldSipConfig == null) {
             return WVPResult.fail(ErrorCode.ERROR404, "用户无法编辑指定sip配置");
         }
+        logger.info("[测试] {} ", sipConfig);
         if (!sipConfigService.editSipConfig(id, sipConfig)) {
             logger.error("[编辑sip配置失败]");
             return WVPResult.fail(ErrorCode.ERROR100, "编辑sip配置失败");