Browse Source

新增外呼日志获取电话与坐席号

anderx 1 year ago
parent
commit
7cfec27cc2

+ 35 - 10
src/main/java/com/goafanti/common/mapper/CallLogMapper.xml

@@ -13,10 +13,12 @@
         <result property="duration" column="duration" jdbcType="INTEGER"/>
         <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
         <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="mobile" column="mobile" jdbcType="VARCHAR"/>
+        <result property="callNo" column="call_no" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="CallLogAllSql">
-        id, uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time
+        id, uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time, mobile, call_no
     </sql>
 
     <!--查询单个-->
@@ -64,6 +66,12 @@
             <if test="createTime != null">
                 and create_time = #{createTime}
             </if>
+            <if test="mobile != null and mobile != ''">
+                and mobile = #{mobile}
+            </if>
+            <if test="callNo != null and callNo != ''">
+                and call_no = #{callNo}
+            </if>
         </where>
         <if test="page_sql != null">
             ${page_sql}
@@ -105,32 +113,42 @@
             <if test="createTime != null">
                 and create_time = #{createTime}
             </if>
+            <if test="mobile != null and mobile != ''">
+                and mobile = #{mobile}
+            </if>
+            <if test="callNo != null and callNo != ''">
+                and call_no = #{callNo}
+            </if>
         </where>
     </select>
 
-
     <!--新增所有列-->
     <insert id="insert" keyProperty="id" useGeneratedKeys="true">
-        insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time)
+        insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time,
+                             mobile, call_no)
         values (#{uid}, #{aid}, #{adminName}, #{contacts}, #{mobileLastDigits}, #{status}, #{duration}, #{remarks},
-                #{createTime})
+                #{createTime}, #{mobile}, #{callNo})
     </insert>
 
     <insert id="insertBatch">
-        insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time)
+        insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time,
+        mobile, call_no)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.uid}, #{entity.aid}, #{entity.adminName}, #{entity.contacts}, #{entity.mobileLastDigits},
-            #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime})
+            #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime}, #{entity.mobile},
+            #{entity.callNo})
         </foreach>
     </insert>
 
     <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time)
+        insert into call_log(uid, aid, admin_name, contacts, mobile_last_digits, status, duration, remarks, create_time,
+        mobile, call_no)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.uid}, #{entity.aid}, #{entity.adminName}, #{entity.contacts}, #{entity.mobileLastDigits},
-            #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime})
+            #{entity.status}, #{entity.duration}, #{entity.remarks}, #{entity.createTime}, #{entity.mobile},
+            #{entity.callNo})
         </foreach>
         on duplicate key update
         uid = values(uid),
@@ -141,10 +159,11 @@
         status = values(status),
         duration = values(duration),
         remarks = values(remarks),
-        create_time = values(create_time)
+        create_time = values(create_time),
+        mobile = values(mobile),
+        call_no = values(call_no)
     </insert>
 
-
     <!--通过主键修改数据-->
     <update id="update">
         update call_log
@@ -176,6 +195,12 @@
             <if test="createTime != null">
                 create_time = #{createTime},
             </if>
+            <if test="mobile != null and mobile != ''">
+                mobile = #{mobile},
+            </if>
+            <if test="callNo != null and callNo != ''">
+                call_no = #{callNo},
+            </if>
         </set>
         where id = #{id}
     </update>

+ 26 - 2
src/main/java/com/goafanti/common/model/CallLog.java

@@ -10,10 +10,10 @@ import java.util.Date;
  * 呼叫记录(CallLog)实体类
  *
  * @author makejava
- * @since 2024-11-20 11:17:55
+ * @since 2024-12-19 11:28:39
  */
 public class CallLog implements Serializable {
-    private static final long serialVersionUID = 958322026904994164L;
+    private static final long serialVersionUID = 302427662635054975L;
     /**
      * id
      */
@@ -54,6 +54,14 @@ public class CallLog implements Serializable {
      * 创建时间
      */
     private Date createTime;
+    /**
+     * 联系方式(尾号)
+     */
+    private String mobile;
+    /**
+     * 外呼坐席号
+     */
+    private String callNo;
 
 
     public Integer getId() {
@@ -137,5 +145,21 @@ public class CallLog implements Serializable {
         this.createTime = createTime;
     }
 
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getCallNo() {
+        return callNo;
+    }
+
+    public void setCallNo(String callNo) {
+        this.callNo = callNo;
+    }
+
 }
 

+ 2 - 0
src/main/java/com/goafanti/customer/service/impl/UserOutboundServiceImpl.java

@@ -201,6 +201,8 @@ public class UserOutboundServiceImpl extends BaseMybatisDao<CallLogMapper> imple
         callLog.setAdminName(name);
         callLog.setContacts(ContactName);
         callLog.setCreateTime(DateUtils.parseDate(startTime));
+        callLog.setMobile(callee);
+        callLog.setCallNo(staffNo);
         String substring = callee.substring(callee.length() - 4);
         callLog.setMobileLastDigits(substring);
         callLog.setDuration(Integer.parseInt(timeLength));