From a7556c6e3acbc7f8a2e14499330c7088f53bb141 Mon Sep 17 00:00:00 2001
From: 15178832520 <121184950@qq.com>
Date: 星期一, 15 六月 2020 23:31:07 +0800
Subject: [PATCH] 威微信æ加入小程序/公众号å类型字段
---
java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml | 97 +++++++++++++++++++++++++++++++++++++++---------
1 files changed, 78 insertions(+), 19 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
index b18bdfd..422aa46 100644
--- a/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
@@ -7,9 +7,9 @@
<!-- 淇濆瓨涓氫富淇℃伅 add by wuxw 2018-07-03 -->
<insert id="saveBusinessOwnerInfo" parameterType="Map">
insert into business_building_owner(
- operate,sex,name,link,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd,community_id,id_card
+ operate,sex,name,link,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd,community_id,id_card,state
) values (
- #{operate},#{sex},#{name},#{link},#{remark},#{ownerId},#{bId},#{userId},#{age},#{memberId},#{ownerTypeCd},#{communityId},#{idCard}
+ #{operate},#{sex},#{name},#{link},#{remark},#{ownerId},#{bId},#{userId},#{age},#{memberId},#{ownerTypeCd},#{communityId},#{idCard},#{state}
)
</insert>
@@ -19,7 +19,7 @@
select t.operate,t.sex,t.name,t.link,t.remark,t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,
t.owner_type_cd ownerTypeCd,t.community_id,t.community_id communityId,
- t.id_card, t.id_card idCard
+ t.id_card, t.id_card idCard,t.state
from business_building_owner t
where 1 =1
<if test="operate !=null and operate != ''">
@@ -55,6 +55,9 @@
<if test="age !=null and age != ''">
and t.age= #{age}
</if>
+ <if test="state !=null and state != ''">
+ and t.state= #{state}
+ </if>
<if test="memberId !=null and memberId != ''">
and t.member_id= #{memberId}
</if>
@@ -68,9 +71,9 @@
<!-- 淇濆瓨涓氫富淇℃伅鑷� instance琛ㄤ腑 add by wuxw 2018-07-03 -->
<insert id="saveOwnerInfoInstance" parameterType="Map">
insert into building_owner(
- sex,name,link,status_cd,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd,community_id,id_card
+ sex,name,link,status_cd,remark,owner_id,b_id,user_id,age,member_id,owner_type_cd,community_id,id_card,state
) select t.sex,t.name,t.link,'0',t.remark,t.owner_id,t.b_id,t.user_id,t.age,t.member_id,t.owner_type_cd,
- t.community_id communityId,t.id_card
+ t.community_id communityId,t.id_card,state
from business_building_owner t where 1=1
and t.operate= 'ADD'
<if test="sex !=null">
@@ -109,7 +112,9 @@
<if test="ownerTypeCd !=null and ownerTypeCd != ''">
and t.owner_type_cd= #{ownerTypeCd}
</if>
-
+ <if test="state !=null and state != ''">
+ and t.state= #{state}
+ </if>
</insert>
@@ -119,9 +124,31 @@
t.owner_id,t.owner_id ownerId,t.b_id,t.b_id bId,
t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,t.owner_type_cd,
t.owner_type_cd ownerTypeCd,t.create_time createTime,t.community_id,
- t.community_id communityId,t.id_card, t.id_card idCard
- from building_owner t
+ t.community_id communityId,t.id_card, t.id_card idCard,t.state,td.name ownerTypeName
+ from building_owner t,t_dict td
+ <if test="roomId != null and roomId != ''">
+ ,building_owner_room_rel borr
+ </if>
+ <if test="roomIds != null ">
+ ,building_owner_room_rel borr
+ </if>
where 1 =1
+ <if test="roomId != null and roomId != ''">
+ and t.owner_id = borr.owner_id
+ and borr.status_cd = '0'
+ and borr.room_id = #{roomId}
+ </if>
+ <if test="roomIds != null">
+ and t.owner_id = borr.owner_id
+ and borr.status_cd = '0'
+ and borr.room_id in
+ <foreach collection="roomIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
+ and td.table_name = 'building_owner'
+ and td.`table_columns` = 'owner_type_cd'
+ and td.status_cd = t.owner_type_cd
<if test="sex !=null">
and t.sex= #{sex}
</if>
@@ -154,6 +181,9 @@
</if>
<if test="age !=null and age != ''">
and t.age= #{age}
+ </if>
+ <if test="state !=null and state != ''">
+ and t.state= #{state}
</if>
<if test="memberId !=null and memberId != ''">
and t.member_id= #{memberId}
@@ -167,6 +197,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="page != -1 and page != null ">
limit #{page}, #{row}
</if>
@@ -177,7 +213,26 @@
<select id="getOwnerInfoCount" parameterType="Map" resultType="Map">
select count(1) count
from building_owner t
+ <if test="roomId != null and roomId != ''">
+ ,building_owner_room_rel borr
+ </if>
+ <if test="roomIds != null ">
+ ,building_owner_room_rel borr
+ </if>
where 1 =1
+ <if test="roomId != null and roomId != ''">
+ and t.owner_id = borr.owner_id
+ and borr.status_cd = '0'
+ and borr.room_id = #{roomId}
+ </if>
+ <if test="roomIds != null">
+ and t.owner_id = borr.owner_id
+ and borr.status_cd = '0'
+ and borr.room_id in
+ <foreach collection="roomIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
<if test="sex !=null">
and t.sex= #{sex}
</if>
@@ -210,6 +265,9 @@
</if>
<if test="age !=null and age != ''">
and t.age= #{age}
+ </if>
+ <if test="state !=null and state != ''">
+ and t.state= #{state}
</if>
<if test="memberId !=null and memberId != ''">
and t.member_id= #{memberId}
@@ -253,6 +311,9 @@
</if>
<if test="age !=null and age != ''">
, t.age= #{age}
+ </if>
+ <if test="state !=null and state != ''">
+ , t.state= #{state}
</if>
<if test="idCard !=null and idCard != ''">
, t.id_card = #{idCard}
@@ -308,6 +369,9 @@
<if test="age !=null and age != ''">
and t.age= #{age}
</if>
+ <if test="state !=null and state != ''">
+ and t.state= #{state}
+ </if>
<if test="memberId !=null and memberId != ''">
and t.member_id= #{memberId}
</if>
@@ -318,15 +382,12 @@
</select>
-
<!-- 鏌ヨ涓氫富鏁伴噺 add by wuxw 2018-07-03 -->
<select id="queryOwnersCountByCondition" parameterType="Map" resultType="Map">
select count(1) count
- FROM building_owner t , s_community_member cm
- WHERE t.`member_id` = cm.`member_id`
- AND cm.`community_id` = #{communityId}
- AND cm.`status_cd` = '0'
- AND t.`status_cd` = '0'
+ FROM building_owner t
+ WHERE
+ t.`status_cd` = '0'
<if test="sex !=null ">
and t.sex= #{sex}
</if>
@@ -378,11 +439,9 @@
t.user_id,t.user_id userId,t.age,t.member_id,t.member_id memberId,
t.owner_type_cd,t.owner_type_cd ownerTypeCd,t.community_id,
t.community_id communityId,t.id_card, t.id_card idCard
- FROM building_owner t , s_community_member cm
- WHERE t.`member_id` = cm.`member_id`
- AND cm.`community_id` = #{communityId}
- AND cm.`status_cd` = '0'
- AND t.`status_cd` = '0'
+ FROM building_owner t
+ WHERE
+ t.`status_cd` = '0'
<if test="sex !=null ">
and t.sex= #{sex}
</if>
--
Gitblit v1.8.0