Browse Source

1缴费查询缓慢

Xiaojh 4 years ago
parent
commit
0d8466ca39

+ 2 - 2
smart-city-platform/src/main/resources/mapper/pay/payFeeMapper.xml

@@ -116,9 +116,9 @@
         from pay_base_customerandmeterrela c
         left join pay_base_account a on c.account_id=a.id
         left join pay_base_waterproperty p on c.waterProperty_id=p.id
-        inner join sc_device device on device.metercode = c.metercode
+        inner join sc_device device on device.metercode = c.metercode and device.customer_id =#{customerId}
         <where>
-            c.businessstate=1 and c.site_id=#{siteId} and c.customer_id=#{customerId}
+            c.businessstate=1 and c.site_id=#{siteId}
             <if test="id != null and id != ''">
                and  c.id= #{id}
             </if>