浏览代码

优化欠费查询sql

wuxw 6 年之前
父节点
当前提交
4809de45d4
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml

+ 1 - 0
java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml

@@ -466,6 +466,7 @@
         t.deadline_time deadlineTime,
         t.deadline_time deadlineTime,
         pf.payer_obj_id payObjId
         pf.payer_obj_id payObjId
         from bill_owe_fee t
         from bill_owe_fee t
+        inner join bill b on t.bill_id = b.bill_id and b.community_id = t.community_id and b.cur_bill = 'T'
         left join pay_fee pf on t.fee_id = pf.fee_id and t.community_id = pf.community_id and pf.status_cd = '0'
         left join pay_fee pf on t.fee_id = pf.fee_id and t.community_id = pf.community_id and pf.status_cd = '0'
         where 1 =1
         where 1 =1
         <if test="oweId !=null and oweId != ''">
         <if test="oweId !=null and oweId != ''">