From c2614ad5c7d1e27fae68e52cd058af363464cdb4 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期六, 21 五月 2022 23:16:38 +0800
Subject: [PATCH] 优化代码

---
 java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
index f5effc6..76bf811 100755
--- a/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
@@ -545,6 +545,12 @@
         <if test="bId != null and bId !=''">
             and u.b_id = #{bId}
         </if>
+        <if test="userIds != null and userIds != null">
+            and u.user_id in
+            <foreach collection="userIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         order by u.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
@@ -563,11 +569,20 @@
         <if test="key != null and key !=''">
             ,u_user_attr ub
         </if>
+        <if test="unionId != null and unionId !=''">
+            ,u_user_attr ua
+        </if>
         where 1= 1
         <if test="openId != null and openId != ''">
             and u.user_id = ua.user_id
             and ua.spec_cd = '100201911001'
             and ua.value = #{openId}
+            and ua.status_cd = '0'
+        </if>
+        <if test="unionId != null and unionId != ''">
+            and u.user_id = ua.user_id
+            and ua.spec_cd = '100201911002'
+            and ua.value = #{unionId}
             and ua.status_cd = '0'
         </if>
         <if test="key != null and key != ''">
@@ -640,11 +655,20 @@
         <if test="openId != null and openId !=''">
             ,u_user_attr ua
         </if>
+        <if test="unionId != null and unionId !=''">
+            ,u_user_attr ua
+        </if>
         where 1= 1
         <if test="openId != null and openId != ''">
             and u.user_id = ua.user_id
             and ua.spec_cd = '100201911001'
             and ua.value = #{openId}
+            and ua.status_cd = '0'
+        </if>
+        <if test="unionId != null and unionId != ''">
+            and u.user_id = ua.user_id
+            and ua.spec_cd = '100201911002'
+            and ua.value = #{unionId}
             and ua.status_cd = '0'
         </if>
         <if test="bId != null and bId !=''">
@@ -674,6 +698,9 @@
         <if test="openId != null and openId !=''">
             ,u_user_attr ua
         </if>
+        <if test="unionId != null and unionId !=''">
+            ,u_user_attr ua
+        </if>
         where 1= 1
         <if test="openId != null and openId != ''">
             and u.user_id = ua.user_id
@@ -681,6 +708,12 @@
             and ua.value = #{openId}
             and ua.status_cd = '0'
         </if>
+        <if test="unionId != null and unionId != ''">
+            and u.user_id = ua.user_id
+            and ua.spec_cd = '100201911002'
+            and ua.value = #{unionId}
+            and ua.status_cd = '0'
+        </if>
         <if test="bId != null and bId !=''">
             and u.b_id = #{bId}
         </if>

--
Gitblit v1.8.0