Преглед на файлове

接口调整,根据线路名称模糊匹配项目线路

peicj преди 2 седмици
родител
ревизия
294bf0a570

+ 9 - 4
ruoyi-admin/src/main/java/com/ruoyi/aicall/controller/ApiController.java

@@ -1196,10 +1196,15 @@ public class ApiController extends BaseController {
                     .collect(Collectors.toList());
             ccGatewaysVo.setGatewayIds(gatewayIds);
         }else{
-            // 网关用途 0 已废弃; 1 电话条; 2 外呼任务; 3 无限制
-            Map<String, Object> params = new HashMap<>();
-            params.put("purposes", Arrays.asList(1,3));
-            ccGatewaysVo.setParams(params);
+            String wgName = param.get("wgName");
+            if(StringUtils.isNotBlank(wgName)){
+                ccGatewaysVo.setGwName(wgName);
+            }else{
+                // 网关用途 0 已废弃; 1 电话条; 2 外呼任务; 3 无限制
+                Map<String, Object> params = new HashMap<>();
+                params.put("purposes", Arrays.asList(1,3));
+                ccGatewaysVo.setParams(params);
+            }
         }
         //3.获取工具条网关列表
         List<CcGateways> gatewaysList = ccGatewaysService.selectCcGatewaysList(ccGatewaysVo);

+ 1 - 1
ruoyi-admin/src/main/resources/mapper/cc/CcGatewaysMapper.xml

@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectCcGatewaysList" parameterType="CcGateways" resultMap="CcGatewaysResult">
         <include refid="selectCcGatewaysVo"/>
         <where>
-            <if test="gwName != null  and gwName != ''"> and gw_name = #{gwName}</if>
+            <if test="gwName != null  and gwName != ''"> and gw_name like concat('%', #{gwName}, '%')</if>
             <if test="profileName != null  and profileName != ''"> and profile_name = #{profileName}</if>
             <if test="caller != null  and caller != ''"> and caller = #{caller}</if>
             <if test="calleePrefix != null  and calleePrefix != ''"> and callee_prefix = #{calleePrefix}</if>