From b03408987fa25f8e3e22ef0ca9157cfb450fa44a Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Tue, 2 Jan 2024 15:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96=EF=BC=8C=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../huoran/users/entity/res/UserInfoListRes.java | 3 +++ .../users/mapper/xml/HrUserAccountMapper.xml | 14 ++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java b/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java index d815087..b521afa 100644 --- a/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java +++ b/users/src/main/java/com/huoran/users/entity/res/UserInfoListRes.java @@ -65,4 +65,7 @@ public class UserInfoListRes implements Serializable { @ApiModelProperty("openId") private String appOpenId; + @ApiModelProperty("账号来源") + private String accountSource; + } diff --git a/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml b/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml index a91e41a..21ebeae 100644 --- a/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml +++ b/users/src/main/java/com/huoran/users/mapper/xml/HrUserAccountMapper.xml @@ -839,20 +839,26 @@ a.is_enable, a.phone, a.create_time, - u.last_login_time, - u.login_number, - GROUP_CONCAT(u.user_name) as user_name, + max(u.last_login_time) as last_login_time, + count(u.login_number) as login_number, + max(CASE WHEN a.platform_id = 7 THEN u.user_name ELSE NULL END) as user_name, a.work_number, GROUP_CONCAT(s.platform_name) as platformName, CASE WHEN count(ai.id) > 0 THEN '已认证' ELSE '未认证' - END as authentication + END as authentication, + CASE + WHEN a.platform_id != 7 AND ta.invitation_account IS NULL THEN '自行注册' + WHEN a.platform_id != 7 AND ta.invitation_account IS NOT NULL THEN ta.invitation_account + ELSE NULL + END as accountSource FROM nakadai.hr_user_info u INNER JOIN nakadai.hr_user_account a ON u.user_id = a.user_id AND a.is_del = 0 inner join sys_platform s on a.platform_id = s.platform_id left join hr_user_authentication_information ai on a.id = ai.account_id + LEFT JOIN k_platform_team_account ta on ta.account_id = a.id WHERE u.is_del = 0 AND a.customer_id IS NULL