From 970568e63de3fe8c5e43a50a8ff3f03b39d48026 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 31 Mar 2022 16:01:19 +0800
Subject: [PATCH] 清空数据项

---
 zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
index 615593d..5027633 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
@@ -486,6 +486,9 @@
             <if test="signDate != null and signDate !='' ">
                 sign_date = #{signDate}
             </if>
+            <if test="openIds != null and openIds !='' ">
+                open_ids = #{openIds}
+            </if>
 
         </set>
         WHERE su_id=#{suId}
@@ -1328,4 +1331,19 @@
     <select id="selectAppVersion" resultType="com.matrix.system.hive.bean.AppVersion">
         select * from app_version
     </select>
+
+    <select id="selectUserByOpenId" resultMap="SysUsersMap">
+        select *,
+        (select GROUP_CONCAT(role_name separator ',') from sys_role where find_in_set(role_id,role_ids) ) roleName
+        from sys_users where find_in_set(#{openId}, open_ids)
+        <if test="companyId != null">
+            and company_id=#{companyId}
+        </if>
+    </select>
+
+    <update id="updateUserOpenId">
+        update sys_users
+        set open_ids=#{openId}
+        where su_id=#{suId}
+    </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1