Browse Source

新增通过用户ID查询登录坐席SDK需要的outId参数

王苗苗 2 days ago
parent
commit
d414e36c9e

+ 18 - 2
slibra-admin/src/main/java/com/slibra/web/controller/business/FrontController.java

@@ -1,6 +1,7 @@
 package com.slibra.web.controller.business;
 package com.slibra.web.controller.business;
 
 
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSON;
+import com.slibra.business.domain.CAgent;
 import com.slibra.business.domain.City;
 import com.slibra.business.domain.City;
 import com.slibra.business.domain.TCallRecord;
 import com.slibra.business.domain.TCallRecord;
 import com.slibra.business.domain.TPumpingStationNeighbourhoodNumber;
 import com.slibra.business.domain.TPumpingStationNeighbourhoodNumber;
@@ -21,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -44,8 +46,8 @@ public class FrontController extends BaseController {
     @Autowired
     @Autowired
     private ITCallRecordService itCallRecordService;
     private ITCallRecordService itCallRecordService;
 
 
-
-
+    @Autowired
+    private CAgentMapper cAgentMapper;
 
 
 
 
 
 
@@ -87,6 +89,20 @@ public class FrontController extends BaseController {
     }
     }
 
 
 
 
+    /**
+     * 获取某个用户的坐席的outId信息
+     * 2024年11月25日17:56:32 配置坐席和用户的逻辑调整,不再放到用户里
+     * @return
+     */
+    @GetMapping("/getSeatsByUserId")
+    public R<HashMap<String, Object>> getSeatsByUserId(Long userId){
+        log.info("进入了 获取某个用户的坐席的outId信息 接口");
+        return R.ok(this.cAgentMapper.getSeatsByUserId(userId));
+    }
+
+
+
+
 
 
 //    /**
 //    /**
 //     * 获取大屏的实时数据 + 统计数据
 //     * 获取大屏的实时数据 + 统计数据

+ 3 - 0
slibra-system/src/main/java/com/slibra/business/mapper/CAgentMapper.java

@@ -1,5 +1,6 @@
 package com.slibra.business.mapper;
 package com.slibra.business.mapper;
 
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import com.slibra.business.domain.CAgent;
 import com.slibra.business.domain.CAgent;
 
 
@@ -60,4 +61,6 @@ public interface CAgentMapper
     public int deleteCAgentByIds(String[] ids);
     public int deleteCAgentByIds(String[] ids);
 
 
     String selectMaxNum();
     String selectMaxNum();
+
+    HashMap<String, Object> getSeatsByUserId(Long userId);
 }
 }

+ 25 - 25
slibra-system/src/main/java/com/slibra/business/mapper/CityMapper.java

@@ -33,29 +33,29 @@ public interface CityMapper
      * @param city 全国省市区数据
      * @param city 全国省市区数据
      * @return 结果
      * @return 结果
      */
      */
-//    public int insertCity(City city);
-//
-//    /**
-//     * 修改全国省市区数据
-//     *
-//     * @param city 全国省市区数据
-//     * @return 结果
-//     */
-//    public int updateCity(City city);
-//
-//    /**
-//     * 删除全国省市区数据
-//     *
-//     * @param id 全国省市区数据主键
-//     * @return 结果
-//     */
-//    public int deleteCityById(String id);
-//
-//    /**
-//     * 批量删除全国省市区数据
-//     *
-//     * @param ids 需要删除的数据主键集合
-//     * @return 结果
-//     */
-//    public int deleteCityByIds(String[] ids);
+    public int insertCity(City city);
+
+    /**
+     * 修改全国省市区数据
+     *
+     * @param city 全国省市区数据
+     * @return 结果
+     */
+    public int updateCity(City city);
+
+    /**
+     * 删除全国省市区数据
+     *
+     * @param id 全国省市区数据主键
+     * @return 结果
+     */
+    public int deleteCityById(String id);
+
+    /**
+     * 批量删除全国省市区数据
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCityByIds(String[] ids);
 }
 }

+ 9 - 0
slibra-system/src/main/resources/mapper/business/CAgentMapper.xml

@@ -128,4 +128,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             c_agent
             c_agent
         WHERE is_delete = 0
         WHERE is_delete = 0
     </select>
     </select>
+
+    <select id="getSeatsByUserId" resultType="hashmap">
+        SELECT
+            out_id outId
+        FROM
+            c_agent
+        WHERE
+            user_id = #{userId}
+    </select>
 </mapper>
 </mapper>

+ 2 - 2
slibra-system/src/main/resources/mapper/business/CityMapper.xml

@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
         where id = #{id}
     </select>
     </select>
 
 
-    <!-- <insert id="insertCity" parameterType="City" useGeneratedKeys="true" keyProperty="id">
+     <insert id="insertCity" parameterType="City" useGeneratedKeys="true" keyProperty="id">
         insert into city
         insert into city
         <trim prefix="(" suffix=")" suffixOverrides=",">
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="code != null">code,</if>
             <if test="code != null">code,</if>
@@ -72,5 +72,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <foreach item="id" collection="array" open="(" separator="," close=")">
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
             #{id}
         </foreach>
         </foreach>
-    </delete>-->
+    </delete>
 </mapper>
 </mapper>