1
0

设备绑定优化

This commit is contained in:
2025-08-01 09:00:32 +08:00
parent 9ffdcace53
commit 5f4b12a320
12 changed files with 569 additions and 17 deletions

View File

@ -7,6 +7,7 @@ import com.fuyuanshen.app.mapper.AppUserMapper;
import com.fuyuanshen.common.core.constant.Constants;
import com.fuyuanshen.common.core.constant.GlobalConstants;
import com.fuyuanshen.common.core.domain.model.AppSmsRegisterBody;
import com.fuyuanshen.common.core.enums.UserType;
import com.fuyuanshen.common.core.exception.BadRequestException;
import com.fuyuanshen.common.core.exception.user.CaptchaException;
import com.fuyuanshen.common.core.exception.user.CaptchaExpireException;
@ -47,6 +48,7 @@ public class AppRegisterService {
String phoneNumber = registerBody.getPhoneNumber();
LambdaQueryWrapper<AppUser> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(AppUser::getPhonenumber, phoneNumber);
wrapper.eq(AppUser::getUserType, UserType.APP_USER.getUserType());
AppUserVo appUserVo = appUserMapper.selectVoOne(wrapper);
if (appUserVo != null) {
throw new BadRequestException("该手机号已被注册");
@ -67,7 +69,7 @@ public class AppRegisterService {
appUser.setNickName(username);
appUser.setPhonenumber(phoneNumber);
appUser.setPassword(password);
appUser.setUserType("app_user");
appUser.setUserType(UserType.APP_USER.getUserType());
appUser.setTenantId(tenantId);
appUser.setLoginIp(ServletUtils.getClientIP());
appUser.setStatus("0");