| | |
| | | b.*, |
| | | t.resident_name as residentName, |
| | | t.phone, |
| | | t.account |
| | | t.account, |
| | | h.house_name as houseName |
| | | FROM |
| | | t_bill b |
| | | LEFT JOIN t_contract c ON c.contract_number = b.contract_number |
| | | LEFT JOIN t_house h ON h.id = c.house_id |
| | | LEFT JOIN t_tenant t ON t.id = c.tenant_id |
| | | <where> |
| | | <if test="query.payFeesStatus != null"> |
| | |
| | | and t.resident_name like concat('%',#{query.residentName},'%') |
| | | </if> |
| | | <if test="query.contractNumber != null and query.contractNumber !=''"> |
| | | and b.contract_number = #{contractNumber} |
| | | and b.contract_number = #{query.contractNumber} |
| | | </if> |
| | | <if test="query.userId != null and query.userId !=''"> |
| | | and t.id = #{query.userId} |
| | | </if> |
| | | </where> |
| | | </select> |