|
@@ -135,10 +135,10 @@
|
|
|
IFNULL(c.now_country_id,-1) AS countryId,
|
|
IFNULL(c.now_country_id,-1) AS countryId,
|
|
|
IFNULL(c.now_street_id,-1) AS streetId,
|
|
IFNULL(c.now_street_id,-1) AS streetId,
|
|
|
count(DISTINCT c.customer_id) as customerNum,
|
|
count(DISTINCT c.customer_id) as customerNum,
|
|
|
- CONCAT(',',c.customer_type_id,',') as customerTypeId
|
|
|
|
|
|
|
+ CONCAT_WS(',',csp.customer_type_id) as customerTypeId
|
|
|
FROM
|
|
FROM
|
|
|
${dbName}_customer.c_customer_subsidy_${operatorId} c
|
|
${dbName}_customer.c_customer_subsidy_${operatorId} c
|
|
|
- join (select subsidy_customer_id from ${dbName}_customer.c_customer_subsidy_supplier_${operatorId} where yn =0 and enabled = 1 group by subsidy_customer_id) csp
|
|
|
|
|
|
|
+ join (select subsidy_customer_id,customer_type_id from ${dbName}_customer.c_customer_subsidy_supplier_${operatorId} where yn =0 and enabled = 1 group by subsidy_customer_id) csp
|
|
|
on c.subsidy_customer_id = csp.subsidy_customer_id
|
|
on c.subsidy_customer_id = csp.subsidy_customer_id
|
|
|
LEFT JOIN ${dbName}_order.o_order_${operatorId} o ON o.customer_id = c.customer_id
|
|
LEFT JOIN ${dbName}_order.o_order_${operatorId} o ON o.customer_id = c.customer_id
|
|
|
WHERE
|
|
WHERE
|
|
@@ -146,7 +146,7 @@
|
|
|
AND o.order_type = 2
|
|
AND o.order_type = 2
|
|
|
and c.yn =0
|
|
and c.yn =0
|
|
|
and o.yn = 0
|
|
and o.yn = 0
|
|
|
- GROUP BY c.now_street_id,c.customer_type_id;
|
|
|
|
|
|
|
+ GROUP BY c.now_street_id,CONCAT_WS(',',csp.customer_type_id);
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getSubsidyCustomerMealList" resultType="com.poteviohealth.cgp.statistics.model.outdto.Customer">
|
|
<select id="getSubsidyCustomerMealList" resultType="com.poteviohealth.cgp.statistics.model.outdto.Customer">
|