From 2fa59cb896243a42623dfb210dc5f426d9f93a78 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期三, 22 二月 2023 00:23:56 +0800
Subject: [PATCH] 优化考勤人员
---
java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
index f509183..d7c1572 100755
--- a/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
@@ -465,7 +465,10 @@
<!-- 鏌ヨ鍛樺伐鎬婚噺 -->
<select id="getStaffCount" parameterType="Map" resultType="Map">
- select count(*) count from(select count(1) count
+ <if test="orgIds != null and orgIds.length > 0">
+ select count(*) count from(
+ </if>
+ select count(1) count
from u_user u
inner join s_store_user su on su.user_id = u.user_id
<if test="(orgId !=null and orgId != '')||(orgIds != null and orgIds.length > 0)">
@@ -511,7 +514,10 @@
</foreach>
and uosr.status_cd =0
GROUP BY u.user_id
- </if>)a
+ </if>
+ <if test="orgIds != null and orgIds.length > 0">
+ )a
+ </if>
</select>
<!-- 鏌ヨ鍛樺伐鎬婚噺 -->
@@ -568,7 +574,8 @@
#{item}
</foreach>
and uosr.status_cd =0
- GROUP BY u.user_id
+ GROUP BY u.user_id u.name,u.email,u.address,u.location_cd,
+ u.age,u.sex,u.tel,u.level_cd ,u.b_id,su.rel_cd ,td.name
</if>
order by u.create_time desc
<if test="page != -1 and page != null ">
@@ -592,9 +599,10 @@
,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.spec_cd in ('100201911001','100201911003')
and ua.value = #{openId}
and ua.status_cd = '0'
</if>
--
Gitblit v1.8.0