|
|
|
@ -3,16 +3,16 @@
|
|
|
|
|
<mapper namespace="com.kiisoo.ic.customer.mapper.OpCustomerDOMapper">
|
|
|
|
|
|
|
|
|
|
<select id="selectCustomerInfoByShopIds" resultType="com.kiisoo.ic.customer.bean.OpCustomerDTO">
|
|
|
|
|
select
|
|
|
|
|
t2.id,t2.`name`,
|
|
|
|
|
SELECT t2.id,t2.`name`,
|
|
|
|
|
t2.member_id as idCard,t0.name as shopName,t0.code as shopCode,
|
|
|
|
|
t4.name as sellerName, t3.birthday, t2.phone,
|
|
|
|
|
t3.name as vipName,t3.phone as vipPhone, t5.staff_code as sellerCode, t1.create_time as createTime
|
|
|
|
|
from
|
|
|
|
|
poi_store t0,
|
|
|
|
|
op_seller_customer_relation t1 LEFT JOIN privilage_user t4 on t1.user_id = t4.id left join poi_store_staff t5 on t4.id = t5.user_id,
|
|
|
|
|
op_customer t2 LEFT JOIN op_vip t3 on t2.member_id = t3.id
|
|
|
|
|
where t0.id = t1.store_id and t1.customer_id = t2.id
|
|
|
|
|
from op_seller_customer_relation t1
|
|
|
|
|
left join poi_store t0 on t0.id = t1.store_id
|
|
|
|
|
left join poi_store_staff t5 ON t5.store_id = t0.id
|
|
|
|
|
LEFT JOIN op_customer t2 ON t2.id = t1.customer_id
|
|
|
|
|
LEFT JOIN op_vip t3 ON t3.id = t2.member_id
|
|
|
|
|
LEFT JOIN privilage_user t4 ON t4.id = t5.user_id where 1 = 1
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="shopId != null and shopId.size > 0 ">
|
|
|
|
|
and t1.store_id in
|
|
|
|
|