|
@@ -8,7 +8,7 @@ class Sql:
|
|
|
|
|
|
# 根据任务id获取推送客户信息
|
|
|
sql_2 = """
|
|
|
- select a.task_key, b.customer_type, b.name, b.mail, b.house_or_region, a.customer_id, GROUP_CONCAT(c.house_or_brand_id) as ids
|
|
|
+ select a.task_key, b.customer_type, b.name, b.mail, b.house_or_region, a.customer_id, GROUP_CONCAT(DISTINCT c.house_or_brand_id) as ids
|
|
|
from report_task_info a left join report_push_customer_info b on b.id = a.customer_id
|
|
|
left join report_customer_authority_info c on b.id = c.customer_id
|
|
|
LEFT JOIN d_house d on d.house_id = c.house_or_brand_id or d.brand_id = c.house_or_brand_id
|