| | |
| | | <?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"> |
| | | |
| | |
| | | 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"> |
| | |
| | | </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, |
| | |
| | | and ms.community_id = #{communityId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询小区成员 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunityMember" parameterType="Map" resultType="Map"> |
| | |
| | | <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} |
| | |
| | | </if> |
| | | </update> |
| | | |
| | | |
| | | <!-- 查询小区成员 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunityMemberCount" parameterType="Map" resultType="Map"> |
| | | select ms.community_id,count(1) count |
| | |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and ms.status_cd = #{statusCd} |
| | | </if> |
| | | |
| | | <if test="bId != null and bId !=''"> |
| | | and ms.b_id = #{bId} |
| | | </if> |
| | |
| | | <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=","> |
| | |
| | | <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 --> |
| | |
| | | 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> |
| | |
| | | #{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"> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询商户小区 --> |
| | | <select id="getStoreCommunitys" parameterType="Map" resultType="Map"> |
| | | SELECT |