团队绑定信息待处理

main
cheney 11 months ago
parent 46911d5132
commit c8bfd27b3a
  1. 34
      nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java

@ -119,23 +119,6 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
data.put("token", JwtUtils.getJwtToken(userAccount.getId().toString()));
userExists = true; // 如果用户存在,将标志位设为true
break; // 如果找到用户,就不需要继续查找
}else {
//根据手机号查询用户
UserAccount userAccountByPhone = baseMapper.selectAccount(appletCallbackReq.getPhone(),platformId.toString());
if (userAccountByPhone!= null){
if (!userAccount.getIsEnable()){
throw new CustomException(ExceptionEnum.ACCOUNT_DISABLED);
}
//邀请添加用户没有openid,登录更新openId
baseMapper.updateAccountOpenId(openid,userAccountByPhone.getId());
//更新登录时间
baseMapper.updateUserInfo(userAccount.getUserId());
data.put("state", "login");
data.put("platformId", platformId);
data.put("token", JwtUtils.getJwtToken(userAccount.getId().toString()));
userExists = true; // 如果用户存在,将标志位设为true
break; // 如果找到用户,就不需要继续查找
}
}
}
@ -156,15 +139,26 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
if (userAccount != null){
return R.error("该用户已存在");
}
Map<String, Object> data = new HashedMap<String, Object>();
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<String, Object> data = new HashedMap<String, Object>();
String randomNumbers = cn.hutool.core.util.RandomUtil.randomNumbers(6);
Integer accountId ;
String userName = "";

Loading…
Cancel
Save