|
@@ -1865,7 +1865,7 @@
|
|
|
|
|
|
|
|
<select id="regionStatic" resultType="java.util.Map">
|
|
<select id="regionStatic" resultType="java.util.Map">
|
|
|
select t4.id,t4.`name`,t6.province,t6.city,count(DISTINCT t3.id) num from trade_order t1 inner join trade_detail t2 on t1.id = t2.order_id
|
|
select t4.id,t4.`name`,t6.province,t6.city,count(DISTINCT t3.id) num from trade_order t1 inner join trade_detail t2 on t1.id = t2.order_id
|
|
|
- inner join trade_visitor t3 on t2.id = t3.detail_id
|
|
|
|
|
|
|
+ inner join trade_visitor t3 on t2.visitor_id = t3.id
|
|
|
inner join ota_distributor t4 on t1.source_id = t4.id
|
|
inner join ota_distributor t4 on t1.source_id = t4.id
|
|
|
inner join ota_distributor_region t5 on t4.id = t5.distributor_id
|
|
inner join ota_distributor_region t5 on t4.id = t5.distributor_id
|
|
|
and (left(t3.credential_no,2) = t5.distributor_region_id or left(t3.credential_no,4) = t5.distributor_region_id)
|
|
and (left(t3.credential_no,2) = t5.distributor_region_id or left(t3.credential_no,4) = t5.distributor_region_id)
|