old mode 100644
new mode 100755
| | |
| | | <!-- 保存小区信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessCommunityInfo" parameterType="Map"> |
| | | insert into business_community(community_id,b_id,name,address,city_code, |
| | | nearby_landmarks,map_x,map_y,month,state,operate,community_area) |
| | | nearby_landmarks,map_x,map_y,month,state,operate,community_area,tel) |
| | | values(#{communityId},#{bId},#{name},#{address},#{cityCode}, |
| | | #{nearbyLandmarks},#{mapX},#{mapY},#{month},#{state},#{operate},#{communityArea}) |
| | | #{nearbyLandmarks},#{mapX},#{mapY},#{month},#{state},#{operate},#{communityArea},#{tel}) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 保存小区属性信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessCommunityAttr" parameterType="Map"> |
| | | insert into business_community_attr(b_id,attr_id,community_id,spec_cd,value,month,operate) |
| | | values(#{bId},#{attrId},#{communityId},#{specCd},#{value},#{month},#{operate}) |
| | | </insert> |
| | | |
| | | <!-- 保存小区照片信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessCommunityPhoto" parameterType="Map"> |
| | | insert into |
| | |
| | | values(#{communityPhotoId},#{bId},#{communityId},#{communityPhotoTypeCd},#{photo},#{month},#{operate}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessCommunityInfo" parameterType="Map" resultType="Map"> |
| | | select s.community_id,s.b_id,s.name,s.address,s.city_code,s.nearby_landmarks, |
| | | s.map_x,s.map_y,s.operate,s.state,s.community_area communityArea,s.community_area |
| | | s.map_x,s.map_y,s.operate,s.state,s.community_area communityArea,s.community_area,s.tel |
| | | from business_community s where 1 = 1 |
| | | <if test="operate != null and operate != ''"> |
| | | and s.operate = #{operate} |
| | |
| | | and s.community_id = #{communityId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询小区属性信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessCommunityAttrs" parameterType="Map" resultType="Map"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存小区信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveCommunityInfoInstance" parameterType="Map"> |
| | | insert into |
| | | s_community(community_id,b_id,name,address,city_code,nearby_landmarks,map_x,map_y,status_cd,state,community_area) |
| | | values(#{community_id},#{b_id},#{name},#{address},#{city_code},#{nearby_landmarks},#{map_x},#{map_y},'0',#{state},#{communityArea}) |
| | | s_community(community_id,b_id,name,address,city_code,nearby_landmarks,map_x,map_y,status_cd,state,community_area,tel) |
| | | values(#{community_id},#{b_id},#{name},#{address},#{city_code},#{nearby_landmarks},#{map_x},#{map_y},'0',#{state},#{communityArea},#{tel}) |
| | | </insert> |
| | | |
| | | <!-- 保存小区属性信息到 instance add by wuxw 2018-07-03 --> |
| | |
| | | </if> |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区信息 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunityInfo" parameterType="Map" resultType="Map"> |
| | | select s.community_id,s.b_id,s.name,s.address,s.city_code,s.nearby_landmarks,s.map_x,s.map_y,s.status_cd,s.state |
| | |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and s.status_cd = #{statusCd} |
| | | </if> |
| | | |
| | | <if test="bId != null and bId !=''"> |
| | | and s.b_id = #{bId} |
| | | </if> |
| | |
| | | <if test="communityId != null and communityId !=''"> |
| | | and sa.community_id = #{communityId} |
| | | </if> |
| | | <if test="specCd != null and specCd !=''"> |
| | | and sa.spec_cd = #{specCd} |
| | | </if> |
| | | <if test="value != null and value !=''"> |
| | | and sa.value = #{value} |
| | | </if> |
| | | <if test="communityIds != null "> |
| | | and sa.community_id in |
| | | <foreach collection="communityIds" item="item" index="index" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="attrId != null and attrId != ''"> |
| | | and sa.attr_id = #{attrId} |
| | | </if> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改小区信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateCommunityInfoInstance" parameterType="Map"> |
| | | update s_community s set s.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,s.b_id = #{newBId} |
| | | </if> |
| | | |
| | | <if test="name != null and name != ''"> |
| | | ,s.name = #{name} |
| | | </if> |
| | |
| | | <if test="state != null and state != ''"> |
| | | ,s.state = #{state} |
| | | </if> |
| | | <if test="tel != null and tel != ''"> |
| | | ,s.tel = #{tel} |
| | | </if> |
| | | <if test="communityArea != null and communityArea != ''"> |
| | | ,s.community_area = #{communityArea} |
| | | </if> |
| | | |
| | | where 1=1 |
| | | <if test="bId != null and bId !=''"> |
| | | and s.b_id = #{bId} |
| | |
| | | <!-- 查询小区信息 add by wuxw 2018-07-03 --> |
| | | <select id="getCommunityInfoNew" parameterType="Map" resultType="Map"> |
| | | select t.address,t.nearby_landmarks,t.nearby_landmarks nearbyLandmarks, |
| | | t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd, |
| | | t.city_code,t.city_code cityCode,t.name,t.status_cd,t.status_cd statusCd,t.tel, |
| | | t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.map_y,t.map_y mapY, |
| | | t.map_x,t.map_x mapX,t.state,(CASE |
| | | WHEN t.state='1000' |
| | |
| | | <if test="memberId !=null and memberId !=''"> |
| | | ,s_community_member cm |
| | | </if> |
| | | where 1 =1 |
| | | where t.status_cd = '0' |
| | | and t.city_code = ca.area_code |
| | | and ca.status_cd = '0' |
| | | <if test="address !=null and address != ''"> |
| | |
| | | </foreach> |
| | | </if> |
| | | group by t.community_id |
| | | order by t.create_time ASC |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | sc.`city_code` cityCode, |
| | | sc.`map_x` mapX, |
| | | sc.`map_y` mapY, |
| | | sc.tel, |
| | | scm.`community_member_id` communityMemberId, |
| | | scm.`member_id` memberId, |
| | | scm.`member_type_cd` memberTypeCd, |
| | |
| | | AND sc.`status_cd` = '0' |
| | | and sc.city_code = ca.area_code |
| | | and ca.parent_area_code = ca1.area_code |
| | | AND scm.`member_id` = #memberId# |
| | | AND scm.`member_type_cd` = #memberTypeCd# |
| | | AND scm.`member_id` = #{memberId} |
| | | AND scm.`member_type_cd` = #{memberTypeCd} |
| | | AND scm.`status_cd` = '0' |
| | | <if test="auditStatusCd ==null or auditStatusCd ==''"> |
| | | and scm.audit_status_cd in ('1000', '1100','1200') |
| | | </if> |
| | | <if test="auditStatusCd !=null and auditStatusCd !=''"> |
| | | and scm.audit_status_cd = #auditStatusCd# |
| | | and scm.audit_status_cd = #{auditStatusCd} |
| | | </if> |
| | | group by sc.community_id |
| | | </select> |