| | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectPropertyCompanyDistrictPage" resultType="org.springblade.modules.property.vo.PropertyCompanyDistrictVO"> |
| | | select * from jczz_property_company_district |
| | | where is_deleted = 0 |
| | | select |
| | | jpcd.*, |
| | | jd.name as districtName |
| | | from jczz_property_company_district jpcd |
| | | left join jczz_district jd on jd.id = jpcd.district_id and jd.is_deleted = 0 |
| | | where jpcd.is_deleted = 0 |
| | | <if test="propertyCompanyDistrict.propertyCompanyId!=null"> |
| | | and property_company_id = #{propertyCompanyDistrict.propertyCompanyId} |
| | | and jpcd.property_company_id = #{propertyCompanyDistrict.propertyCompanyId} |
| | | </if> |
| | | <if test="propertyCompanyDistrict.districtId!=null"> |
| | | and district_id = #{propertyCompanyDistrict.districtId} |
| | | and jpcd.district_id = #{propertyCompanyDistrict.districtId} |
| | | </if> |
| | | <if test="propertyCompanyDistrict.propertyStage!=null"> |
| | | and property_stage = #{propertyCompanyDistrict.propertyStage} |
| | | and jpcd.property_stage = #{propertyCompanyDistrict.propertyStage} |
| | | </if> |
| | | <if test="propertyCompanyDistrict.principal!=null and propertyCompanyDistrict.principal!=''"> |
| | | and principal like concat('%',#{propertyCompanyDistrict.principal},'%') |
| | | and jpcd.principal like concat('%',#{propertyCompanyDistrict.principal},'%') |
| | | </if> |
| | | <if test="propertyCompanyDistrict.districtName!=null and propertyCompanyDistrict.districtName!=''"> |
| | | and jd.name like concat('%',#{propertyCompanyDistrict.districtName},'%') |
| | | </if> |
| | | </select> |
| | | |