瀏覽代碼

cid 是否添加企业微信 做到 客户列表上

三七 1 月之前
父節點
當前提交
0396cc05b3

+ 12 - 0
fs-service/src/main/java/com/fs/company/domain/CompanyVoiceRoboticCallees.java

@@ -77,4 +77,16 @@ public class CompanyVoiceRoboticCallees{
 
     @TableField(exist = false)
     private List<CrmCustomerProperty> tagList ;
+
+    /**
+    * 是否添加;0否1是2加微中
+    */
+    @TableField(exist = false)
+    private Integer isAdd;
+
+    /**
+    * 客服id
+    */
+    @TableField(exist = false)
+    private Integer customer_id;
 }

+ 13 - 7
fs-service/src/main/java/com/fs/company/mapper/CompanyVoiceRoboticCalleesMapper.java

@@ -5,20 +5,21 @@ import com.fs.company.domain.CompanyVoiceRoboticCallees;
 import com.fs.company.domain.CompanyWxClient;
 import com.fs.company.vo.SendMsgByTaskVO;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 
 import java.util.List;
 import java.util.Set;
 
 /**
  * 任务外呼电话Mapper接口
- * 
+ *
  * @author fs
  * @date 2024-12-04
  */
 public interface CompanyVoiceRoboticCalleesMapper extends BaseMapper<CompanyVoiceRoboticCallees> {
     /**
      * 查询任务外呼电话
-     * 
+     *
      * @param id 任务外呼电话ID
      * @return 任务外呼电话
      */
@@ -26,15 +27,20 @@ public interface CompanyVoiceRoboticCalleesMapper extends BaseMapper<CompanyVoic
 
     /**
      * 查询任务外呼电话列表
-     * 
+     *
      * @param companyVoiceRoboticCallees 任务外呼电话
      * @return 任务外呼电话集合
      */
     public List<CompanyVoiceRoboticCallees> selectCompanyVoiceRoboticCalleesList(CompanyVoiceRoboticCallees companyVoiceRoboticCallees);
 
+    @Select("select cv.*,cw.is_add,cw.customer_id from company_voice_robotic_callees  cv " +
+            "left join  company_wx_client cw on cv.robotic_id = cw.robotic_id " +
+            "where cv.robotic_id = #{roboticId}")
+    public List<CompanyVoiceRoboticCallees> selectCompanyVoiceRoboticCalleesListByRoboticId(@Param("roboticId") Long id);
+
     /**
      * 新增任务外呼电话
-     * 
+     *
      * @param companyVoiceRoboticCallees 任务外呼电话
      * @return 结果
      */
@@ -42,7 +48,7 @@ public interface CompanyVoiceRoboticCalleesMapper extends BaseMapper<CompanyVoic
 
     /**
      * 修改任务外呼电话
-     * 
+     *
      * @param companyVoiceRoboticCallees 任务外呼电话
      * @return 结果
      */
@@ -50,7 +56,7 @@ public interface CompanyVoiceRoboticCalleesMapper extends BaseMapper<CompanyVoic
 
     /**
      * 删除任务外呼电话
-     * 
+     *
      * @param id 任务外呼电话ID
      * @return 结果
      */
@@ -58,7 +64,7 @@ public interface CompanyVoiceRoboticCalleesMapper extends BaseMapper<CompanyVoic
 
     /**
      * 批量删除任务外呼电话
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */

+ 11 - 10
fs-service/src/main/java/com/fs/company/service/impl/CompanyVoiceRoboticCalleesServiceImpl.java

@@ -11,7 +11,7 @@ import java.util.List;
 
 /**
  * 任务外呼电话Service业务层处理
- * 
+ *
  * @author fs
  * @date 2024-12-04
  */
@@ -23,7 +23,7 @@ public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVo
 
     /**
      * 查询任务外呼电话
-     * 
+     *
      * @param id 任务外呼电话ID
      * @return 任务外呼电话
      */
@@ -35,7 +35,7 @@ public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVo
 
     /**
      * 查询任务外呼电话列表
-     * 
+     *
      * @param companyVoiceRoboticCallees 任务外呼电话
      * @return 任务外呼电话
      */
@@ -47,7 +47,7 @@ public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVo
 
     /**
      * 新增任务外呼电话
-     * 
+     *
      * @param companyVoiceRoboticCallees 任务外呼电话
      * @return 结果
      */
@@ -59,7 +59,7 @@ public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVo
 
     /**
      * 修改任务外呼电话
-     * 
+     *
      * @param companyVoiceRoboticCallees 任务外呼电话
      * @return 结果
      */
@@ -71,7 +71,7 @@ public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVo
 
     /**
      * 批量删除任务外呼电话
-     * 
+     *
      * @param ids 需要删除的任务外呼电话ID
      * @return 结果
      */
@@ -83,7 +83,7 @@ public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVo
 
     /**
      * 删除任务外呼电话信息
-     * 
+     *
      * @param id 任务外呼电话ID
      * @return 结果
      */
@@ -95,9 +95,10 @@ public class CompanyVoiceRoboticCalleesServiceImpl extends ServiceImpl<CompanyVo
 
     @Override
     public List<CompanyVoiceRoboticCallees> selectCompanyVoiceRoboticCalleesListByRoboticId(Long id) {
-        CompanyVoiceRoboticCallees param = new CompanyVoiceRoboticCallees();
-        param.setRoboticId(id);
-        List<CompanyVoiceRoboticCallees> companyVoiceRoboticCallees = selectCompanyVoiceRoboticCalleesList(param);
+//        CompanyVoiceRoboticCallees param = new CompanyVoiceRoboticCallees();
+//        param.setRoboticId(id);
+//        List<CompanyVoiceRoboticCallees> companyVoiceRoboticCallees = selectCompanyVoiceRoboticCalleesList(param);
+        List<CompanyVoiceRoboticCallees> companyVoiceRoboticCallees = companyVoiceRoboticCalleesMapper.selectCompanyVoiceRoboticCalleesListByRoboticId(id);
         if(null != companyVoiceRoboticCallees && !companyVoiceRoboticCallees.isEmpty()){
             companyVoiceRoboticCallees.forEach(item -> {
                 item.setIdToString(item.getId().toString());

+ 5 - 5
fs-service/src/main/resources/mapper/company/CompanyVoiceRoboticCalleesMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.fs.company.mapper.CompanyVoiceRoboticCalleesMapper">
-    
+
     <resultMap type="CompanyVoiceRoboticCallees" id="CompanyVoiceRoboticCalleesResult">
         <result property="id"    column="id"    />
         <result property="userId"    column="user_id"    />
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectCompanyVoiceRoboticCalleesList" parameterType="CompanyVoiceRoboticCallees" resultType="CompanyVoiceRoboticCallees">
         <include refid="selectCompanyVoiceRoboticCalleesVo"/>
-        <where>  
+        <where>
             <if test="userId != null "> and user_id = #{userId}</if>
             <if test="userName != null  and userName != ''"> and user_name = #{userName}</if>
             <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
@@ -27,7 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="params != null  and params != ''"> and params = #{params}</if>
         </where>
     </select>
-    
     <select id="selectCompanyVoiceRoboticCalleesById" parameterType="Long" resultMap="CompanyVoiceRoboticCalleesResult">
         <include refid="selectCompanyVoiceRoboticCalleesVo"/>
         where id = #{id}
@@ -79,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteCompanyVoiceRoboticCalleesByIds" parameterType="String">
-        delete from company_voice_robotic_callees where id in 
+        delete from company_voice_robotic_callees where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -202,6 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     </select>
 
+
     <insert id="batchInsertGenerateInfo" useGeneratedKeys="true" keyProperty="id">
         INSERT INTO company_voice_robotic_callees
         (phone, robotic_id, task_flow, run_task_flow, is_we_com, user_id, user_name, is_generate)
@@ -212,4 +212,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item.userName}, #{item.isGenerate})
         </foreach>
     </insert>
-</mapper>
+</mapper>