| @@ -67,6 +67,13 @@ | |||||
| and `bind_status` = #{bindStatus} | and `bind_status` = #{bindStatus} | ||||
| </if> | </if> | ||||
| <if test=" null != merchantMeterStatus and 1 == merchantMeterStatus"> | |||||
| and `id` not in (select meter_id from kw_merchant_meter where status = 0) | |||||
| </if> | |||||
| <if test=" null != merchantMeterStatus and 0 == merchantMeterStatus"> | |||||
| and `id` in (select meter_id from kw_merchant_meter where status = 0) | |||||
| </if> | |||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | ||||
| @@ -80,9 +87,6 @@ | |||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from kw_meter | from kw_meter | ||||
| <if test=" null != merchantMeterStatus "> | |||||
| inner join kw_merchant_meter mm on mm.meter_id = id and mm.status = #{merchantMeterStatus} | |||||
| </if> | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||