java110
2022-01-17 48c9414db4b7c44a43524115570796025d38a653
java110-db/src/main/resources/mapper/user/OwnerAttrServiceDaoImplMapper.xml
old mode 100644 new mode 100755
@@ -7,9 +7,17 @@
    <!-- 保存业主属性信息 add by wuxw 2018-07-03 -->
    <insert id="saveBusinessOwnerAttrInfo" parameterType="Map">
        insert into business_building_owner_attr(
        attr_id,operate,create_time,spec_cd,b_id,community_id,value,member_id
        attr_id,operate,spec_cd,b_id,community_id,value,member_id
        ) values (
        #{attrId},#{operate},#{createTime},#{specCd},#{bId},#{communityId},#{value},#{memberId}
        #{attrId},#{operate},#{specCd},#{bId},#{communityId},#{value},#{memberId}
        )
    </insert>
    <insert id="saveOwnerAttr" parameterType="Map">
        insert into building_owner_attr(
        attr_id,spec_cd,b_id,community_id,value,member_id
        ) values (
        #{attrId},#{specCd},'-1',#{communityId},#{value},#{memberId}
        )
    </insert>
@@ -26,7 +34,7 @@
        <if test="operate !=null and operate != ''">
            and t.operate= #{operate}
        </if>
        <if test="createTime !=null and createTime != ''">
        <if test="createTime !=null ">
            and t.create_time= #{createTime}
        </if>
        <if test="specCd !=null and specCd != ''">
@@ -84,8 +92,13 @@
    <select id="getOwnerAttrInfo" parameterType="Map" resultType="Map">
        select t.attr_id,t.attr_id attrId,t.create_time,t.create_time createTime,t.spec_cd,t.spec_cd
        specCd,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.community_id,t.community_id
        communityId,t.value,t.member_id,t.member_id memberId
        communityId,t.value,t.member_id,t.member_id memberId,
        s.spec_name specName,
        v.value_name valueName,
        s.list_show listShow
        from building_owner_attr t
        left join attr_spec s on t.spec_cd = s.spec_cd and s.status_cd = '0' and s.table_name = 'building_owner_attr'
        left join attr_value v on t.`value` = v.`value` and t.spec_cd = v.spec_cd and v.status_cd = '0'
        where 1 =1
        <if test="attrId !=null and attrId != ''">
            and t.attr_id= #{attrId}
@@ -111,6 +124,13 @@
        <if test="memberId !=null and memberId != ''">
            and t.member_id= #{memberId}
        </if>
        <if test="memberIds !=null">
            and t.member_id in
            <foreach collection="memberIds" open="(" close=")"
                     separator="," item="item">
                #{item}
            </foreach>
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
@@ -124,9 +144,6 @@
        update building_owner_attr t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="createTime !=null and createTime != ''">
            , t.create_time= #{createTime}
        </if>
        <if test="specCd !=null and specCd != ''">
            , t.spec_cd= #{specCd}