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 | 68 +++++++++++++++++++++++++++------
1 files changed, 55 insertions(+), 13 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
index 348f742..422aa46 100644
--- a/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/OwnerServiceDaoImplMapper.xml
@@ -124,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,t.state
- 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>
@@ -175,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>
@@ -185,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>
@@ -335,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>
@@ -395,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