| | |
| | | <mapper namespace="org.springblade.modules.property.mapper.PropertyCapitalApplyMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="propertyCapitalApplyResultMap" type="org.springblade.modules.property.entity.PropertyCapitalApplyEntity"> |
| | | <resultMap id="propertyCapitalApplyResultMap" |
| | | type="org.springblade.modules.property.entity.PropertyCapitalApplyEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="property_company_id" property="propertyCompanyId"/> |
| | | <result column="district_id" property="districtId"/> |
| | |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | <result column="article_id" property="articleId"/> |
| | | <result column="attachment" property="attachment"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectPropertyCapitalApplyPage" resultMap="propertyCapitalApplyResultMap"> |
| | | select * from jczz_property_capital_apply where is_deleted = 0 |
| | | <!--自定义分页查询--> |
| | | <select id="selectPropertyCapitalApplyPage" resultType="org.springblade.modules.property.vo.PropertyCapitalApplyVO"> |
| | | select |
| | | jpca.*, |
| | | jd.name as districtName |
| | | from jczz_property_capital_apply jpca |
| | | left join jczz_district jd on jd.id = jpca.district_id and jd.is_deleted = 0 |
| | | where jpca.is_deleted = 0 |
| | | <if test="propertyCapitalApply.districtId!=null"> |
| | | and jpca.district_id = #{propertyCapitalApply.districtId} |
| | | </if> |
| | | <if test="propertyCapitalApply.name!=null and propertyCapitalApply.name!=''"> |
| | | and jpca.name like concat('%',#{propertyCapitalApply.name},'%') |
| | | </if> |
| | | <if test="propertyCapitalApply.linkman!=null and propertyCapitalApply.linkman!=''"> |
| | | and jpca.linkman like concat('%',#{propertyCapitalApply.linkman},'%') |
| | | </if> |
| | | <if test="propertyCapitalApply.districtName!=null and propertyCapitalApply.districtName!=''"> |
| | | and jd.name like concat('%',#{propertyCapitalApply.districtName},'%') |
| | | </if> |
| | | <if test="propertyCapitalApply.districtIdList!=null and propertyCapitalApply.districtIdList.size()>0"> |
| | | and jpca.district_id in |
| | | <foreach collection="propertyCapitalApply.districtIdList" item="item" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jd.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | </choose> |
| | | </if> |
| | | order by jpca.create_time desc |
| | | </select> |
| | | |
| | | |