Commit 35fb74da authored by zhaobiyan's avatar zhaobiyan

客户会员筛选字段

parent e8a403ca
......@@ -72,6 +72,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -83,7 +84,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
......@@ -113,6 +114,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -124,7 +126,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
......@@ -154,6 +156,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -165,7 +168,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
......@@ -190,6 +193,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -201,7 +205,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
......@@ -460,6 +464,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -471,7 +476,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
<include refid="myCustomerQuery"/>
......@@ -1411,6 +1416,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -1422,7 +1428,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
......@@ -1445,6 +1451,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -1456,7 +1463,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
......@@ -1520,6 +1527,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -1532,7 +1540,7 @@
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0 AND contact.enter_open_sea_time is NOT NULL
<include refid="myCustomerQuery"/>
......@@ -1555,6 +1563,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -1567,7 +1576,7 @@
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0 AND contact.enter_open_sea_time is NOT NULL
<include refid="myCustomerQuery"/>
</select>
......@@ -1627,6 +1636,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -1638,7 +1648,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
<if test="deptId != null and deptId>0">
......@@ -1664,6 +1674,7 @@
c.social as default_social,
c.email as default_email,
c.social_number as default_social_number,
c.userid as contact_member_id,
su.nickname as customer_service_name,
su.dept_id as dept_id
from ecw_customer a
......@@ -1675,7 +1686,7 @@
left join ecw_customer_credit credit
on contact.credit_level = credit.id
left join ecw_country ec on contact.country = ec.id
left join member_user mu on contact.member_id = mu.id
left join member_user mu on contact.contact_member_id = mu.id
WHERE 1=1 AND contact.deleted = 0
<if test="deptId != null and deptId>0">
......
......@@ -55,7 +55,8 @@
LEFT JOIN ecw_indirect_customer_contacts c ON a.id = c.customer_id
LEFT JOIN ecw_customer agent ON a.agent_customer_id = agent.id
LEFT JOIN system_user su ON a.customer_service = su.id
left join member_user mu on agent.member_id = mu.id
left join ecw_customer_contacts ecc on agent.id = ecc.customer_id
left join member_user mu on ecc.userid = mu.id
WHERE
c.is_default = 1 AND a.deleted = 0
AND c.deleted = 0
......@@ -183,7 +184,8 @@
LEFT JOIN ecw_indirect_customer_contacts c ON a.id = c.customer_id
LEFT JOIN ecw_customer agent ON a.agent_customer_id = agent.id
LEFT JOIN system_user su ON a.customer_service = su.id
left join member_user mu on agent.member_id = mu.id
left join ecw_customer_contacts ecc on agent.id = ecc.customer_id
left join member_user mu on ecc.userid = mu.id
WHERE
c.is_default = 1 AND a.deleted = 0
AND c.deleted = 0
......@@ -210,7 +212,8 @@
LEFT JOIN ecw_indirect_customer_contacts c ON a.id = c.customer_id
LEFT JOIN ecw_customer agent ON a.agent_customer_id = agent.id
LEFT JOIN system_user su ON a.customer_service = su.id
left join member_user mu on agent.member_id = mu.id
left join ecw_customer_contacts ecc on agent.id = ecc.customer_id
left join member_user mu on ecc.userid = mu.id
WHERE
c.is_default = 1 AND a.deleted = 0
AND c.deleted = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment