Your Name
2023-07-11 d7d9b601b2e4fdb663375993e2cfbdbd363df421
java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml
@@ -6,9 +6,9 @@
    <!-- 保存业主信息信息 add by wuxw 2018-07-03 -->
    <insert id="saveOwnerInfo" parameterType="Map">
        insert into building_owner(id_card, sex, link, owner_type_cd, remark, owner_id, user_id, name, state,
                                   community_id, age, member_id, address)
        community_id, age, member_id, address)
        values (#{idCard}, #{sex}, #{link}, #{ownerTypeCd}, #{remark}, #{ownerId}, #{userId}, #{name}, #{state},
                #{communityId}, #{age}, #{memberId}, #{address})
        #{communityId}, #{age}, #{memberId}, #{address})
    </insert>
    <!-- 查询业主信息信息 add by wuxw 2018-07-03 -->
@@ -33,6 +33,12 @@
        <if test="ownerTypeCd !=null and ownerTypeCd != ''">
            and t.owner_type_cd= #{ownerTypeCd}
        </if>
        <if test="ownerTypeCds != null">
            and t.owner_type_cd in
            <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
@@ -42,11 +48,20 @@
        <if test="ownerId !=null and ownerId != ''">
            and t.owner_id= #{ownerId}
        </if>
        <if test="ownerIds !=null">
            and t.owner_id in
            <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="nameLike !=null and nameLike != ''">
            and t.name like concat('%',#{nameLike},'%')
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
@@ -72,9 +87,7 @@
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="idCard !=null and idCard != ''">
            , t.id_card= #{idCard}
        </if>
        , t.id_card= #{idCard}
        <if test="sex !=null and sex != ''">
            , t.sex= #{sex}
        </if>
@@ -105,7 +118,7 @@
        <if test="communityId !=null and communityId != ''">
            , t.community_id= #{communityId}
        </if>
        <if test="age !=null and age != ''">
        <if test="age != ''">
            , t.age= #{age}
        </if>
        where 1=1
@@ -134,6 +147,12 @@
        <if test="ownerTypeCd !=null and ownerTypeCd != ''">
            and t.owner_type_cd= #{ownerTypeCd}
        </if>
        <if test="ownerTypeCds != null">
            and t.owner_type_cd in
            <foreach collection="ownerTypeCds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="remark !=null and remark != ''">
            and t.remark= #{remark}
        </if>
@@ -143,11 +162,20 @@
        <if test="ownerId !=null and ownerId != ''">
            and t.owner_id= #{ownerId}
        </if>
        <if test="ownerIds !=null">
            and t.owner_id in
            <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="nameLike !=null and nameLike != ''">
            and t.name like concat('%',#{nameLike},'%')
        </if>
        <if test="state !=null and state != ''">
            and t.state= #{state}
@@ -179,4 +207,18 @@
        </if>
    </select>
    <select id="queryOwnerMembersCount" parameterType="Map" resultType="Map">
        select t.owner_id ownerId,count(1) memberCount
        from
        building_owner t
        where t.status_cd = '0'
        and t.owner_type_cd != '1001'
        and t.owner_id in
        <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
            #{item}
        </foreach>
        group by t.owner_id
    </select>
</mapper>