无法受邀加入该平台组织,账号已在其他平台存在组织信息

main
cheney 11 months ago
parent 2d317e88b4
commit 30a2349b7e
  1. 2
      common/src/main/java/com/huoran/common/exception/ExceptionEnum.java
  2. 14
      nakadai/src/main/java/com/huoran/nakadai/service/impl/PlatformTeamAccountServiceImpl.java

@ -60,6 +60,8 @@ public enum ExceptionEnum {
DATA_PLATFORM_ACCOUNT_AVALIABLE_FAIL(10022, "当前用户所在的院校在数据平台的可用账号数量不足,是否继续!"),
INVITATION_CODE_EXPIRED(10023, "邀请码已失效"),
USER_ALREADY_EXISTS_GROUP(10024, "用户已存在该组织"),
USER_ALREADY_EXISTS_OTHER_GROUP(10024, "无法受邀加入该平台组织,账号已在其他平台存在组织信息!"),
CANT_JOIN_TEAM(10025, "无法加入自己的团队"),
CANNOT_ADDED_REPEATEDLY(10026, "该用户已经是团队管理员,无法重复添加!"),
DEFAULT_ROLE_NOTEXIST(10027, "默认角色不存在"),

@ -328,9 +328,21 @@ public class PlatformTeamAccountServiceImpl extends ServiceImpl<PlatformTeamAcco
}
//验证手机验证码
if (inviteJoinInfo.getCode().equals(value)) {
if (inviteJoinInfo.getPlatformId()==5){
// 查询邀请用户其他平台是否存在账号
UserAccount userAccount = baseMapper.selectAccount(inviteJoinInfo.getPhone(),"6");
if (userAccount != null) {
throw new CustomException(ExceptionEnum.USER_ALREADY_EXISTS_OTHER_GROUP);
}
}else {
UserAccount userAccount = baseMapper.selectAccount(inviteJoinInfo.getPhone(),"5");
if (userAccount != null) {
throw new CustomException(ExceptionEnum.USER_ALREADY_EXISTS_OTHER_GROUP);
}
}
//查询邀请用户是否存在账号
UserAccount userAccount = baseMapper.selectAccount(inviteJoinInfo.getPlatformId().toString(), inviteJoinInfo.getPhone());
UserAccount userAccount = baseMapper.selectAccount(inviteJoinInfo.getPhone(),inviteJoinInfo.getPlatformId().toString());
Integer manageId ;
//邀请人为成员且账号存在,则直接拉入该团队,不可重复拉入

Loading…
Cancel
Save