|
|
|
@ -275,8 +275,8 @@
|
|
|
|
|
SELECT
|
|
|
|
|
sum( negative_feedback_cnt ) AS delCusNum
|
|
|
|
|
FROM poi_customer_contact_data_stat
|
|
|
|
|
WHERE stat_time >= #{startDate}
|
|
|
|
|
AND stat_time <= #{endDate}
|
|
|
|
|
WHERE date(stat_time) >= #{startDate}
|
|
|
|
|
AND date(stat_time) <= #{endDate}
|
|
|
|
|
group by region_id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -284,8 +284,8 @@
|
|
|
|
|
SELECT
|
|
|
|
|
sum( negative_feedback_cnt ) AS delCusNum
|
|
|
|
|
FROM poi_customer_contact_data_stat
|
|
|
|
|
WHERE stat_time >= #{startDate}
|
|
|
|
|
AND stat_time <= #{endDate}
|
|
|
|
|
WHERE date(stat_time) >= #{startDate}
|
|
|
|
|
AND date(stat_time) <= #{endDate}
|
|
|
|
|
group by store_id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -293,10 +293,10 @@
|
|
|
|
|
SELECT count(t.customer_id) from op_seller_customer_relation t
|
|
|
|
|
WHERE t.store_id = #{storeId}
|
|
|
|
|
<if test="startDate != null">
|
|
|
|
|
and t.create_time >= #{startDate}
|
|
|
|
|
and date(t.create_time) >= #{startDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endDate != null">
|
|
|
|
|
and t.create_time <= #{endDate}
|
|
|
|
|
and date(t.create_time) <= #{endDate}
|
|
|
|
|
</if>
|
|
|
|
|
group by t.store_id
|
|
|
|
|
</select>
|
|
|
|
@ -308,10 +308,10 @@
|
|
|
|
|
AND t2.user_id = #{userId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startDate != null">
|
|
|
|
|
and t1.create_time >= #{startDate}
|
|
|
|
|
and date(t1.create_time) >= #{startDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endDate != null">
|
|
|
|
|
and t1.create_time <= #{endDate}
|
|
|
|
|
and date(t1.create_time) <= #{endDate}
|
|
|
|
|
</if>
|
|
|
|
|
group by t1.user_id
|
|
|
|
|
</select>
|
|
|
|
@ -329,10 +329,10 @@
|
|
|
|
|
WHERE
|
|
|
|
|
t. store_id = #{storeId}
|
|
|
|
|
<if test="startDate != null">
|
|
|
|
|
and t.create_time >= #{startDate}
|
|
|
|
|
and date(t.create_time) >= #{startDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endDate != null">
|
|
|
|
|
and t.create_time <= #{endDate}
|
|
|
|
|
and date(t.create_time) <= #{endDate}
|
|
|
|
|
</if>
|
|
|
|
|
GROUP BY
|
|
|
|
|
t.user_id
|
|
|
|
@ -368,10 +368,10 @@
|
|
|
|
|
`op_seller_customer_relation` t2
|
|
|
|
|
where 1=1
|
|
|
|
|
<if test="startDate != null">
|
|
|
|
|
and t2.create_time >= #{startDate}
|
|
|
|
|
and date(t2.create_time) >= #{startDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endDate != null">
|
|
|
|
|
and t2.create_time <= #{endDate}
|
|
|
|
|
and date(t2.create_time) <= #{endDate}
|
|
|
|
|
</if>
|
|
|
|
|
GROUP BY
|
|
|
|
|
t2.store_id
|
|
|
|
@ -390,10 +390,10 @@
|
|
|
|
|
poi_store_staff t1, `op_seller_customer_relation` t2
|
|
|
|
|
where t1.id = t2.user_id
|
|
|
|
|
<if test="startDate != null">
|
|
|
|
|
and t2.create_time >= #{startDate}
|
|
|
|
|
and date(t2.create_time) >= #{startDate}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endDate != null">
|
|
|
|
|
and t2.create_time <= #{endDate}
|
|
|
|
|
and date(t2.create_time) <= #{endDate}
|
|
|
|
|
</if>
|
|
|
|
|
and t1.store_id = #{storeId}
|
|
|
|
|
and t1.type = 4
|
|
|
|
|