|
|
@@ -292,6 +292,12 @@ public interface CrmCustomerMapper extends BaseMapper<CrmCustomer> {
|
|
|
"<if test = 'maps.roboticId != null and maps.taskCustomerFilter != null and maps.taskCustomerFilter == \"inTask\" '> " +
|
|
|
"and c.customer_id IN (SELECT ce.user_id FROM company_voice_robotic_callees ce WHERE ce.robotic_id = #{maps.roboticId}) " +
|
|
|
"</if>" +
|
|
|
+ "<if test = 'maps.aiConnectFilter != null and maps.aiConnectFilter == \"todayNotConnected\" '> " +
|
|
|
+ "and (select ifnull(sum(case when aic.call_time > 0 then 1 else 0 end), 0) from company_voice_robotic_call_log_callphone aic inner join company_voice_robotic_callees ce on ce.id = aic.caller_id where ce.user_id = c.customer_id and date(aic.create_time) = curdate()) = 0 " +
|
|
|
+ "</if>" +
|
|
|
+ "<if test = 'maps.aiConnectFilter != null and maps.aiConnectFilter == \"totalNotConnected\" '> " +
|
|
|
+ "and (select ifnull(sum(case when aic.call_time > 0 then 1 else 0 end), 0) from company_voice_robotic_call_log_callphone aic inner join company_voice_robotic_callees ce on ce.id = aic.caller_id where ce.user_id = c.customer_id) = 0 " +
|
|
|
+ "</if>" +
|
|
|
"${maps.params.dataScope}"+
|
|
|
" order by c.customer_id desc "+
|
|
|
"</script>"})
|