cl.name_zh as vip_level_name_zh, cl.name_en as vip_level_name_en,
cl.name_zh as vip_level_name_zh, cl.name_en as vip_level_name_en,
cc.name_zh as credit_level_name_zh, cc.name_en as credit_level_name_en,
cc.name_zh as credit_level_name_zh, cc.name_en as credit_level_name_en,
country.name_zh as country_name_zh, country.name_en as country_name_en,
country.name_zh as country_name_zh, country.name_en as country_name_en,
(select p.* from ecw_product p where FIND_IN_SET(p.id, c.product_ids) as product_list,
p.id as prod_id,
(select pt.* from ecw_product_type pt where FIND_IN_SET(pt.id, c.product_types) as product_type_list,
p.type_id as prod_type_id,
p.attr_id as attr_id,
p.title_zh as prod_title_zh,
p.title_en as prod_title_en,
p.material_type as material_type,
p.packaging as packaging,
pt.id as type_id,
pt.title_zh as type_title_zh,
pt.title_en as type_title_en,
(SELECT GROUP_CONCAT(title_zh) FROM ecw_node n WHERE FIND_IN_SET(n.id,(SELECT pickup_points FROM ecw_customer WHERE id=c.id))) AS pickup_point_name_zh,
(SELECT GROUP_CONCAT(title_zh) FROM ecw_node n WHERE FIND_IN_SET(n.id,(SELECT pickup_points FROM ecw_customer WHERE id=c.id))) AS pickup_point_name_zh,
(SELECT GROUP_CONCAT(title_en) FROM ecw_node n WHERE FIND_IN_SET(n.id,(SELECT pickup_points FROM ecw_customer WHERE id=c.id))) AS pickup_point_name_en,
(SELECT GROUP_CONCAT(title_en) FROM ecw_node n WHERE FIND_IN_SET(n.id,(SELECT pickup_points FROM ecw_customer WHERE id=c.id))) AS pickup_point_name_en,
(SELECT GROUP_CONCAT(name_zh) FROM ecw_country ct WHERE FIND_IN_SET(ct.id,(SELECT busi_country_ids FROM ecw_customer WHERE id=c.id))) AS busi_country_name_zh,
(SELECT GROUP_CONCAT(name_zh) FROM ecw_country ct WHERE FIND_IN_SET(ct.id,(SELECT busi_country_ids FROM ecw_customer WHERE id=c.id))) AS busi_country_name_zh,
...
@@ -151,6 +159,8 @@
...
@@ -151,6 +159,8 @@
uu.nickname as updater_name,
uu.nickname as updater_name,
u.nickname as customer_service_name
u.nickname as customer_service_name
from ecw_customer c
from ecw_customer c
left join ecw_product p on FIND_IN_SET(p.id, c.product_ids)
left join ecw_product_type pt on FIND_IN_SET(pt.id, c.product_types)
left join ecw_customer_level cl on c.level = cl.id
left join ecw_customer_level cl on c.level = cl.id
left join ecw_customer_credit cc on c.credit_level = cc.id
left join ecw_customer_credit cc on c.credit_level = cc.id
left join ecw_country country on c.country = country.id
left join ecw_country country on c.country = country.id