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 a635418..d8834a5 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 @@ -411,12 +411,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(); - } - } + //查询账号详情 + HrUserAccount hrUserAccount = hrUserAccountMapper.selectOne(new QueryWrapper() + .eq("app_open_id", openId).eq("platform_id", 7)); + //查询用户信息 - HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userId); + HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(hrUserAccount.getUserId()); if (StringUtils.isNotBlank(url)){ hrUserInfo.setUserAvatars(url); }