From d7d9b601b2e4fdb663375993e2cfbdbd363df421 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 11 七月 2023 22:17:37 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml
index c07a57d..288221f 100644
--- a/java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml
@@ -6,9 +6,9 @@
<!-- 淇濆瓨涓氫富淇℃伅淇℃伅 add by wuxw 2018-07-03 -->
<insert id="saveOwnerInfo" parameterType="Map">
insert into building_owner(id_card, sex, link, owner_type_cd, remark, owner_id, user_id, name, state,
- community_id, age, member_id, address)
+ community_id, age, member_id, address)
values (#{idCard}, #{sex}, #{link}, #{ownerTypeCd}, #{remark}, #{ownerId}, #{userId}, #{name}, #{state},
- #{communityId}, #{age}, #{memberId}, #{address})
+ #{communityId}, #{age}, #{memberId}, #{address})
</insert>
<!-- 鏌ヨ涓氫富淇℃伅淇℃伅 add by wuxw 2018-07-03 -->
@@ -33,6 +33,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="remark !=null and remark != ''">
and t.remark= #{remark}
</if>
@@ -42,11 +48,20 @@
<if test="ownerId !=null and ownerId != ''">
and t.owner_id= #{ownerId}
</if>
+ <if test="ownerIds !=null">
+ and t.owner_id in
+ <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
<if test="userId !=null and userId != ''">
and t.user_id= #{userId}
</if>
<if test="name !=null and name != ''">
and t.name= #{name}
+ </if>
+ <if test="nameLike !=null and nameLike != ''">
+ and t.name like concat('%',#{nameLike},'%')
</if>
<if test="state !=null and state != ''">
and t.state= #{state}
@@ -132,6 +147,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="remark !=null and remark != ''">
and t.remark= #{remark}
</if>
@@ -141,11 +162,20 @@
<if test="ownerId !=null and ownerId != ''">
and t.owner_id= #{ownerId}
</if>
+ <if test="ownerIds !=null">
+ and t.owner_id in
+ <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ </if>
<if test="userId !=null and userId != ''">
and t.user_id= #{userId}
</if>
<if test="name !=null and name != ''">
and t.name= #{name}
+ </if>
+ <if test="nameLike !=null and nameLike != ''">
+ and t.name like concat('%',#{nameLike},'%')
</if>
<if test="state !=null and state != ''">
and t.state= #{state}
@@ -177,4 +207,18 @@
</if>
</select>
+ <select id="queryOwnerMembersCount" parameterType="Map" resultType="Map">
+ select t.owner_id ownerId,count(1) memberCount
+ from
+ building_owner t
+ where t.status_cd = '0'
+ and t.owner_type_cd != '1001'
+ and t.owner_id in
+ <foreach collection="ownerIds" item="item" open="(" close=")" separator=",">
+ #{item}
+ </foreach>
+ group by t.owner_id
+ </select>
+
+
</mapper>
--
Gitblit v1.8.0