|
|
|
@@ -277,8 +277,8 @@ |
|
|
|
|
|
|
|
<select id="getMerchantMeter" resultMap="MerchantMeterMap"> |
|
|
|
select m.id as merchant_id,m.name as merchant_name,ifnull(mm.status,0) has from wx_merchant m |
|
|
|
left join (select merchant_id,1 as status from kw_merchant_meter where status=0) mm on m.id=mm.merchant_id |
|
|
|
where m.id not in(select merchant_id from wx_merchant_power_bill_config where tenant_id=#{tenantId}) |
|
|
|
left join (select merchant_id,1 as status from kw_merchant_meter where status=0 group by merchant_id) mm on m.id=mm.merchant_id |
|
|
|
where m.status=1 and m.id not in(select merchant_id from wx_merchant_power_bill_config where tenant_id=#{tenantId}) |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |