linwe
2023-11-25 aa6df327e9c022e4a89baef1462f3f868dce1fd2
src/main/java/org/springblade/modules/property/mapper/PropertyCompanyMapper.xml
@@ -8,9 +8,9 @@
        <result column="name" property="name"/>
        <result column="address" property="address"/>
        <result column="social_credit_code" property="socialCreditCode"/>
        <result column="province_code" property="provinceCode"/>
        <result column="city_code" property="cityCode"/>
        <result column="county_code" property="countyCode"/>
        <result column="province" property="province"/>
        <result column="city" property="city"/>
        <result column="area" property="area"/>
        <result column="remark" property="remark"/>
        <result column="create_user" property="createUser"/>
        <result column="create_time" property="createTime"/>
@@ -19,9 +19,31 @@
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <select id="selectPropertyCompanyPage" resultMap="propertyCompanyResultMap">
    <!--自定义分页查询-->
    <select id="selectPropertyCompanyPage" resultType="org.springblade.modules.property.vo.PropertyCompanyVO">
        select * from jczz_property_company where is_deleted = 0
        <if test="propertyCompany.name!=null and propertyCompany.name!=''">
            and name like concat('%',#{propertyCompany.name},'%')
        </if>
    </select>
    <!--物业公司列表查询(不分页)-->
    <select id="getPropertyCompanyList" resultType="org.springblade.modules.property.vo.PropertyCompanyVO">
        select * from jczz_property_company where is_deleted = 0
        <if test="propertyCompany.name!=null and propertyCompany.name!=''">
            and name like concat('%',#{propertyCompany.name},'%')
        </if>
    </select>
    <!--物业公司列表查询(不分页)-->
    <select id="getUserByPropertyCompany" resultType="java.util.Map">
        select
            bu.id,bu.real_name as name
        from blade_user bu
        left join blade_dept bd on bd.id = bu.dept_id and bd.is_deleted = 0
        left join jczz_property_company jpc on jpc.dept_id = bd.id and jpc.is_deleted = 0
        where bu.is_deleted = 0 and bu.real_name is not null
        and jpc.id = #{propertyCompany.id}
    </select>