| @@ -50,6 +50,7 @@ public class KwMerchantMeter extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "修改时间", name = "updateTime") | @io.swagger.annotations.ApiModelProperty(value = "修改时间", name = "updateTime") | ||||
| private Date updateTime; | private Date updateTime; | ||||
| public static enum Field { | public static enum Field { | ||||
| Id_ASC("`id` ASC"), | Id_ASC("`id` ASC"), | ||||
| Id_DESC("`id` DESC"), | Id_DESC("`id` DESC"), | ||||
| @@ -77,6 +77,9 @@ public class KwMeter extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "状态0绑定1未绑定", name = "bindStatus") | @io.swagger.annotations.ApiModelProperty(value = "状态0绑定1未绑定", name = "bindStatus") | ||||
| private Integer bindStatus; | private Integer bindStatus; | ||||
| @Transient | |||||
| private Integer merchantMeterStatus; | |||||
| @Transient | @Transient | ||||
| protected KwMeterData latestRecord; | protected KwMeterData latestRecord; | ||||
| @@ -78,7 +78,7 @@ | |||||
| <select id="findMeterList" parameterType="java.util.Map" resultMap="MeterBaseResultMap"> | <select id="findMeterList" parameterType="java.util.Map" resultMap="MeterBaseResultMap"> | ||||
| select m.* from kw_merchant_meter mm | select m.* from kw_merchant_meter mm | ||||
| left join kw_meter m on mm.`meter_id` = m.id | left join kw_meter m on mm.`meter_id` = m.id | ||||
| where mm.`status` = 0 and m.`bind_status` = 0 | |||||
| where mm.`status` = 0 | |||||
| <if test=" null != merchantId "> | <if test=" null != merchantId "> | ||||
| and mm.`merchant_id` = #{merchantId} | and mm.`merchant_id` = #{merchantId} | ||||
| </if> | </if> | ||||
| @@ -80,6 +80,9 @@ | |||||
| 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> | ||||