diff --git a/src/main/resources/mapper/PoiCustomerContactDataStatDOMapper.xml b/src/main/resources/mapper/PoiCustomerContactDataStatDOMapper.xml index e428efc..a2be789 100644 --- a/src/main/resources/mapper/PoiCustomerContactDataStatDOMapper.xml +++ b/src/main/resources/mapper/PoiCustomerContactDataStatDOMapper.xml @@ -3,7 +3,7 @@ select store_id as storeId, - SUM(negative_feedback_cnt) as negativeFeedbackCnt, - SUM(new_apply_cnt) as newApplyCnt, - SUM(chat_cnt) as chatCnt, - SUM(message_cnt) as messageCnt, - AVG(avg_reply_time) as avgReplyTime, - AVG(reply_percentage) as replyPercentage, - SUM(new_contact_cnt) as newContactCnt - from poi_customer_contact_data_stat where + IFNULL(SUM(negative_feedback_cnt),0) as negativeFeedbackCnt, + IFNULL(SUM(new_apply_cnt),0) as newApplyCnt, + IFNULL(SUM(chat_cnt),0) as chatCnt, + IFNULL(SUM(message_cnt),0) as messageCnt, + IFNULL(AVG(avg_reply_time),0) as avgReplyTime, + IFNULL(AVG(reply_percentage),0) as replyPercentage, + IFNULL(SUM(new_contact_cnt),0) as newContactCnt + from poi_customer_contact_data_stat where store_id in #{item}