|
|
@@ -137,4 +137,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
<if test="isWeCom != null "> and t1.is_we_com = #{isWeCom}</if>
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+ <select id="listAll" parameterType="CompanyVoiceRoboticCallLogAddwx" resultType="com.fs.company.vo.CompanyVoiceRoboticCallLogAddwxVO">
|
|
|
+ select
|
|
|
+ t1.*,
|
|
|
+ t2.wx_nick_name as wxAccountName,
|
|
|
+ t3.nick_name as wxClientName,
|
|
|
+ t3.is_add as isAdd,
|
|
|
+ t3.phone as phone,
|
|
|
+ t3.add_time as addTime,
|
|
|
+ t4.company_name as companyName,
|
|
|
+ t5.nick_name as companyUserName,
|
|
|
+ t6.intention as intention,
|
|
|
+ t7.name as dialogName
|
|
|
+ from company_voice_robotic_call_log_addwx t1
|
|
|
+ left join company_wx_account t2 on t1.wx_account_id = t2.id
|
|
|
+ left join company_wx_client t3 on t3.id = t1.wx_client_id
|
|
|
+ left join company t4 on t4.company_id = t1.company_id
|
|
|
+ left join company_user t5 on t5.user_id = t2.company_user_id
|
|
|
+ left join company_voice_robotic_wx t6 on t6.robotic_id = t1.robotic_id
|
|
|
+ left join company_wx_dialog t7 on t7.id = t6.wx_dialog_id
|
|
|
+ <where>
|
|
|
+ t1.is_we_com = 2
|
|
|
+ <if test="logId != null"> and t1.log_id = #{logId}</if>
|
|
|
+ <if test="customerId != null"> and t3.customer_id = #{customerId}</if>
|
|
|
+ <if test="roboticId != null"> and t1.robotic_id = #{roboticId}</if>
|
|
|
+ <if test="wxClientId != null"> and t1.wx_client_id = #{wxClientId}</if>
|
|
|
+ <if test="runTime != null"> and t1.run_time = #{runTime}</if>
|
|
|
+ <if test="status != null"> and t1.status = #{status}</if>
|
|
|
+ <if test="companyId != null"> and t1.company_id = #{companyId}</if>
|
|
|
+ <if test="wxAccountId != null"> and t1.wx_account_id = #{wxAccountId}</if>
|
|
|
+ <if test="beginTime != null and beginTime != ''">
|
|
|
+ and t1.run_time >= #{beginTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
+ and t1.run_time <= #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by t1.log_id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="countListAll" parameterType="CompanyVoiceRoboticCallLogAddwx" resultType="java.util.HashMap">
|
|
|
+ select
|
|
|
+ count(1) as totalRecordCount,
|
|
|
+ count(case when t1.status = 2 then 1 end) as successRecordCount,
|
|
|
+ <choose>
|
|
|
+ <when test="runTime != null or (beginTime != null and beginTime != '') or (endTime != null and endTime != '')">
|
|
|
+ count(1) as todayRecordCount
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ count(case when date(t1.run_time) = curdate() then 1 end) as todayRecordCount
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ from company_voice_robotic_call_log_addwx t1
|
|
|
+ left join company_wx_account t2 on t1.wx_account_id = t2.id
|
|
|
+ left join company_wx_client t3 on t3.id = t1.wx_client_id
|
|
|
+ left join company t4 on t4.company_id = t2.company_id
|
|
|
+ left join company_user t5 on t5.user_id = t2.company_user_id
|
|
|
+ left join company_voice_robotic_wx t6 on t6.robotic_id = t1.robotic_id
|
|
|
+ left join company_wx_dialog t7 on t7.id = t6.wx_dialog_id
|
|
|
+ <where>
|
|
|
+ t1.is_we_com = 2
|
|
|
+ <if test="roboticId != null"> and t1.robotic_id = #{roboticId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+</mapper>
|