From c8bfd27b3a69b05b18b6f8fe9680fc9a255953f1 Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Wed, 20 Dec 2023 18:40:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=BE=85=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PlatformTeamAccountServiceImpl.java | 34 ++++++++----------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java b/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java index 4f49b21..0387d16 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java +++ b/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java @@ -119,23 +119,6 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl data = new HashedMap(); + if (appletCallbackReq.getPhone()!= null){ UserAccount userAccountByPhone = baseMapper.selectAccount(appletCallbackReq.getPhone(),appletCallbackReq.getPlatformId().toString()); //根据手机号查询用户 if (userAccountByPhone != null){ - return R.error("该用户已存在"); + if (!userAccountByPhone.getIsEnable()){ + throw new CustomException(ExceptionEnum.ACCOUNT_DISABLED); + } + //邀请添加用户没有openid,登录更新openId + baseMapper.updateAccountOpenId(appletCallbackReq.getOpenId(),userAccountByPhone.getId()); + //更新登录时间 + baseMapper.updateUserInfo(userAccountByPhone.getUserId()); + data.put("token", JwtUtils.getJwtToken(userAccountByPhone.getId().toString())); + data.put("openId", appletCallbackReq.getOpenId()); + //TODO 团队信息待处理 +// data.put("teamId",platformTeamClassification.getId()); +// data.put("teamName",teamName); } } - - Map data = new HashedMap(); String randomNumbers = cn.hutool.core.util.RandomUtil.randomNumbers(6); Integer accountId ; String userName = ""; From a3675924b25089a37f5921f2340824a28edb456f Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Wed, 20 Dec 2023 18:52:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E8=B4=A6=E5=8F=B7=E9=9A=8F=E6=9C=BA=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PlatformTeamAccountServiceImpl.java | 12 +++++++----- .../users/service/impl/HrUserAccountServiceImpl.java | 11 ++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java b/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java index 0387d16..4edfbd3 100644 --- a/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java +++ b/nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java @@ -159,7 +159,9 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl userAccountList = hrUserAccountMapper.selectList(new QueryWrapper() .eq("app_open_id", openId)); - //查询用户信息 - HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userAccountList.get(0).getUserId()); - hrUserInfo.setPhone(userAccountList.get(0).getPhone()); + //查询个人端用户信息 + Integer userId = null; + for (HrUserAccount hrUserAccount : userAccountList) { + if (hrUserAccount.getPlatformId().equals("7")){ + userId = hrUserAccount.getUserId(); + } + } + HrUserInfo hrUserInfo = hrUserInfoMapper.selectByUserId(userId); hrUserInfo.setAuthentication("未认证"); UserAuthenticationInformation authenticationInformation = userAuthenticationInformationMapper.selectOne(