java110-db/src/main/resources/mapper/community/CommunityServiceDaoImplMapper.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="communityServiceDaoImpl">
@@ -17,7 +16,6 @@
        insert into s_community_attr(b_id, attr_id, community_id, spec_cd, value, month, status_cd)
        values (#{bId}, #{attrId}, #{communityId}, #{specCd}, #{value}, #{month}, #{statusCd})
    </insert>
    <!-- 保存小区属性信息  add by wuxw 2018-07-03 -->
    <insert id="saveBusinessCommunityAttr" parameterType="Map">
@@ -272,7 +270,6 @@
        </if>
    </update>
    <!--小区成员加入 add by wuxw 2018-10-27 saveBusinessCommunityMember-->
    <insert id="saveBusinessCommunityMember" parameterType="Map">
        insert into business_community_member(community_member_id, b_id, community_id, member_id, member_type_cd, month,
@@ -309,7 +306,6 @@
            and ms.community_id = #{communityId}
        </if>
    </select>
    <!-- 查询小区成员  add by wuxw 2018-07-03 -->
    <select id="getCommunityMember" parameterType="Map" resultType="Map">
@@ -378,9 +374,9 @@
        <if test="communityName != null and communityName != '' and needCommunityInfo == true">
            and sc.name like concat('%',#{communityName},'%')
        </if>
        <!--        <if test="needCommunityInfo == true">-->
        <!--            group by ms.community_id-->
        <!--        </if>-->
        <!--<if test="needCommunityInfo == true">
            group by ms.community_id
        </if>-->
        order by ms.create_time desc
        <if test="page != -1 and page != null">
            limit #{page},#{row}
@@ -411,7 +407,6 @@
        </if>
    </update>
    <!-- 查询小区成员  add by wuxw 2018-07-03 -->
    <select id="getCommunityMemberCount" parameterType="Map" resultType="Map">
        select ms.community_id,count(1) count
@@ -428,7 +423,6 @@
        <if test="statusCd != null and statusCd != ''">
            and ms.status_cd = #{statusCd}
        </if>
        <if test="bId != null and bId !=''">
            and ms.b_id = #{bId}
        </if>
@@ -443,22 +437,18 @@
        <if test="memberId != null and memberId != '' and needCommunityInfo == false">
            and ms.member_id = #{memberId}
        </if>
        <if test="subMemberId != null and subMemberId != ''">
            and ms.member_id = #{subMemberId}
        </if>
        <if test="noAuditEnterCommunity == true">
            and ms.member_type_cd not in ('390001200003','390001200005','390001200000')
        </if>
        <if test="memberTypeCd != null and memberTypeCd != ''">
            and ms.member_type_cd = #{memberTypeCd}
        </if>
        <if test="auditStatusCd != null and auditStatusCd != ''">
            and ms.audit_status_cd = #{auditStatusCd}
        </if>
        <if test="auditStatusCds != null and auditStatusCds != null">
            and ms.audit_status_cd in
            <foreach collection="auditStatusCds" item="item" open="(" close=")" separator=",">
@@ -471,10 +461,9 @@
        <if test="communityName != null and communityName != '' and needCommunityInfo == true">
            and sc.name like concat('%',#{communityName},'%')
        </if>
        <!--        <if test="needCommunityInfo == true">-->
        <!--            group by ms.community_id-->
        <!--        </if>-->
        <!--<if test="needCommunityInfo == true">
            group by ms.community_id
        </if>-->
    </select>
    <!-- 查询小区信息 add by wuxw 2018-07-03 -->
@@ -510,11 +499,11 @@
            and t.city_code= #{cityCode}
        </if>
        <if test="name !=null and name != ''">
            and t.name = #{name}
            and t.name like concat('%',#{name},'%')
        </if>
        <if test="nameLike !=null and nameLike != ''">
        <!--<if test="nameLike !=null and nameLike != ''">
            and t.name like concat('%',#{nameLike},'%')
        </if>
        </if>-->
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
@@ -553,14 +542,12 @@
                #{item}
            </foreach>
        </if>
        <!--        group by t.community_id-->
        order by t.create_time ASC
        <!--group by t.community_id-->
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
    <!-- 查询小区数量 add by wuxw 2018-07-03 -->
    <select id="queryCommunitysCount" parameterType="Map" resultType="Map">
@@ -622,9 +609,8 @@
                #{item}
            </foreach>
        </if>
    </select>
    <!-- 查询商户小区 -->
    <select id="getStoreCommunitys" parameterType="Map" resultType="Map">
        SELECT