(SELECT GROUP_CONCAT(name) FROM ecw_customer_competitor n WHERE FIND_IN_SET(n.id,(SELECT competitor_ids FROM ecw_customer WHERE id=a.id))) AS competitor_names,
(SELECT GROUP_CONCAT(name) FROM ecw_customer_competitor n WHERE FIND_IN_SET(n.id,(SELECT competitor_ids FROM ecw_customer WHERE id=a.id))) AS competitor_names,
su2.creator as create_username
su2.nickname as create_username
from ecw_customer a
from ecw_customer a
left join (select * from ecw_customer_contacts where is_default = 1 and deleted = 0) as c on a.id = c.customer_id
left join (select * from ecw_customer_contacts where is_default = 1 and deleted = 0) as c on a.id = c.customer_id
left join system_user su on a.customer_service = su.id
left join system_user su on a.customer_service = su.id
...
@@ -519,26 +519,21 @@
...
@@ -519,26 +519,21 @@
AND contact.is_customer_service_confirmed = #{query.isCustomerServiceConfirmed}
AND contact.is_customer_service_confirmed = #{query.isCustomerServiceConfirmed}
</if>
</if>
<iftest="query.department != null and query.department != '' ">
AND contact.department = #{query.department}
<!--部门deptIds-->
<iftest="query.deptIds != null and query.deptIds.size()>0">
(contact.enter_open_sea_time is not null and contact.enter_open_sea_time BETWEEN #{query.beginEnterOpenSeaTime} AND #{query.endEnterOpenSeaTime})
</foreach>
or (contact.enter_open_sea_time is null and contact.estimate_enter_open_sea_time BETWEEN #{query.beginEnterOpenSeaTime} AND #{query.endEnterOpenSeaTime})
</if>
)
</if>
</if>
<!--客户状态 -->
<!--是否新客户-->
<iftest="query.status != null and query.status.size()>0">
<iftest="query.isInOpenSea != null">
AND contact.is_in_open_sea = #{query.isInOpenSea}
</if>
<iftest="query.status != null and query.status != '' and query.status.size()==1 ">
GET {{baseUrl}}/ecw/customer/page?pageNo=1&pageSize=100&name=
GET {{baseUrl}}/ecw/customer/page?pageNo=1&pageSize=10&customerService[0]=1144&customerService[1]=2659&beginEnterOpenSeaTime=2024-10-02%2000%3A00%3A00&endEnterOpenSeaTime=2024-10-05%2000%3A00%3A00