From 0842bf0736f7f9b1ee12611420c4664c7fdf617f Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Thu, 21 Dec 2023 15:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/huoran/nakadai/entity/UserInfo.java | 1 + .../com/huoran/users/mapper/xml/HrUserAccountMapper.xml | 6 +++--- .../users/service/impl/HrUserAccountServiceImpl.java | 9 ++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/nakadai/src/main/java/com/huoran/nakadai/entity/UserInfo.java b/nakadai/src/main/java/com/huoran/nakadai/entity/UserInfo.java index b3d1256..8af16f3 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/entity/UserInfo.java +++ b/nakadai/src/main/java/com/huoran/nakadai/entity/UserInfo.java @@ -76,6 +76,7 @@ public class UserInfo implements Serializable { private Integer isDel; @ApiModelProperty(value = "最后登陆时间") + @TableField(fill = FieldFill.INSERT) private Date lastLoginTime; @ApiModelProperty(value = "绑定多个角色id") 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 2be8246..20bf179 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 @@ -843,10 +843,10 @@ u.login_number, CASE WHEN count(ai.id) > 0 THEN ai.real_name - ELSE u.user_name + ELSE GROUP_CONCAT(u.user_name) END as user_name, a.work_number, - s.platform_name, + GROUP_CONCAT(s.platform_name) as platformName, CASE WHEN count(ai.id) > 0 THEN '已认证' ELSE '未认证' @@ -881,7 +881,7 @@ AND ( a.phone LIKE CONCAT('%',#{userInfoReq.searchContent},'%') OR u.user_name LIKE CONCAT('%',#{userInfoReq.searchContent},'%')) - GROUP BY a.id + GROUP BY a.app_open_id ORDER BY create_time DESC diff --git a/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java b/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java index a9d77f3..a635418 100644 --- a/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java +++ b/users/src/main/java/com/huoran/users/service/impl/HrUserAccountServiceImpl.java @@ -443,8 +443,15 @@ public class HrUserAccountServiceImpl extends ServiceImpl userAccountList = hrUserAccountMapper.selectList(new QueryWrapper() .eq("app_open_id", openId)); + //查询个人端用户信息 + Integer userId = null; + for (HrUserAccount hrUserAccount : userAccountList) { + if (hrUserAccount.getPlatformId().equals("7")){ + userId = hrUserAccount.getUserId(); + } + } //查询用户信息 - HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userAccountList.get(0).getUserId()); + HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userId); if (StringUtils.isNotBlank(url)){ hrUserInfo.setUserAvatars(url); }