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] =?UTF-8?q?=E5=9B=A2=E9=98=9F=E7=BB=91=E5=AE=9A=E4=BF=A1?= =?UTF-8?q?=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 = "";