| | |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectHouseTenant"> |
| | | select |
| | | id, |
| | | housing_rental_id, |
| | | name, |
| | | phone, |
| | | id_card, |
| | | domicile, |
| | | work_unit, |
| | | remark, |
| | | is_deleted |
| | | from |
| | | jczz_house_tenant |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectHouseTenantPage" resultMap="houseTenantResultMap"> |
| | | select * from jczz_house_tenant where is_deleted = 0 |
| | | <include refid="selectHouseTenant"/> |
| | | <where> |
| | | <if test="houseTenant.id != null "> and id = #{houseTenant.id}</if> |
| | | <if test="houseTenant.housingRentalId != null "> and housing_rental_id = #{houseTenant.housingRentalId}</if> |
| | | <if test="houseTenant.name != null and name != ''"> and name = #{houseTenant.name}</if> |
| | | <if test="houseTenant.phone != null and phone != ''"> and phone = #{houseTenant.phone}</if> |
| | | <if test="houseTenant.idCard != null and idCard != ''"> and id_card = #{houseTenant.idCard}</if> |
| | | <if test="houseTenant.domicile != null and domicile != ''"> and domicile = #{houseTenant.domicile}</if> |
| | | <if test="houseTenant.workUnit != null and workUnit != ''"> and work_unit = #{houseTenant.workUnit}</if> |
| | | <if test="houseTenant.remark != null and remark != ''"> and remark = #{houseTenant.remark}</if> |
| | | <if test="houseTenant.isDeleted != null "> and is_deleted = #{houseTenant.isDeleted}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据租房id删除租户信息--> |
| | | <update id="removeByHousingRentalId"> |
| | | update jczz_house_tenant set is_deleted = 1 where housing_rental_id = #{housingRentalId} |
| | | </update> |
| | | |
| | | </mapper> |