|
|
|
@ -179,15 +179,19 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="countCustomerByDate" resultType="java.lang.Integer">
|
|
|
|
|
SELECT count(1)
|
|
|
|
|
from op_seller_customer_relation t1
|
|
|
|
|
join poi_store t0 on t0.id = t1.store_id
|
|
|
|
|
left join poi_store_staff t5 ON t5.store_id = t0.id and t1.user_id = t5.id
|
|
|
|
|
JOIN op_customer t2 ON t2.id = t1.customer_id
|
|
|
|
|
where t1.create_time >= #{startDate}
|
|
|
|
|
and t1.create_time <= #{endDate}
|
|
|
|
|
SELECT
|
|
|
|
|
count(1)
|
|
|
|
|
FROM
|
|
|
|
|
op_seller_customer_relation t ,
|
|
|
|
|
privilage_cp_user t3,
|
|
|
|
|
privilage_cp_user_store t4
|
|
|
|
|
WHERE
|
|
|
|
|
t4.store_id = t.store_id
|
|
|
|
|
AND t3.id = t4.cp_user_id
|
|
|
|
|
and t.create_time >= #{startDate}
|
|
|
|
|
and t.create_time <= #{endDate}
|
|
|
|
|
<if test="shopIds != null and shopIds.size > 0">
|
|
|
|
|
and t1.store_id in
|
|
|
|
|
and t.store_id in
|
|
|
|
|
<foreach collection="shopIds" separator="," item="item" index="index" close=")" open="(">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|