Jelajahi Sumber

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

王苗苗 2 hari lalu
induk
melakukan
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;
 
 import com.alibaba.fastjson2.JSON;
+import com.slibra.business.domain.CAgent;
 import com.slibra.business.domain.City;
 import com.slibra.business.domain.TCallRecord;
 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.web.bind.annotation.*;
 
+import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -44,8 +46,8 @@ public class FrontController extends BaseController {
     @Autowired
     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;
 
+import java.util.HashMap;
 import java.util.List;
 import com.slibra.business.domain.CAgent;
 
@@ -60,4 +61,6 @@ public interface CAgentMapper
     public int deleteCAgentByIds(String[] ids);
 
     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 全国省市区数据
      * @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
         WHERE is_delete = 0
     </select>
+
+    <select id="getSeatsByUserId" resultType="hashmap">
+        SELECT
+            out_id outId
+        FROM
+            c_agent
+        WHERE
+            user_id = #{userId}
+    </select>
 </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}
     </select>
 
-    <!-- <insert id="insertCity" parameterType="City" useGeneratedKeys="true" keyProperty="id">
+     <insert id="insertCity" parameterType="City" useGeneratedKeys="true" keyProperty="id">
         insert into city
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <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=")">
             #{id}
         </foreach>
-    </delete>-->
+    </delete>
 </mapper>