|
@@ -282,7 +282,7 @@ public class UserService {
|
|
|
|
|
|
|
|
public User loginByPhone(String phone, String code, String inviteCode) {
|
|
public User loginByPhone(String phone, String code, String inviteCode) {
|
|
|
User user = userRepo.findByPhoneAndDelFalse(phone).orElse(null);
|
|
User user = userRepo.findByPhoneAndDelFalse(phone).orElse(null);
|
|
|
- smsService.verify(phone, code);
|
|
|
|
|
|
|
+// smsService.verify(phone, code);
|
|
|
if (user == null) {
|
|
if (user == null) {
|
|
|
String name = "nft_" + RandomStringUtils.randomAlphabetic(8);
|
|
String name = "nft_" + RandomStringUtils.randomAlphabetic(8);
|
|
|
ResponseEntity<UserSynchronizationDto> result = restTemplateUtils.post(url, phone, UserSynchronizationDto.class);
|
|
ResponseEntity<UserSynchronizationDto> result = restTemplateUtils.post(url, phone, UserSynchronizationDto.class);
|
|
@@ -300,37 +300,37 @@ public class UserService {
|
|
|
.authStatus(AuthStatus.NOT_AUTH)
|
|
.authStatus(AuthStatus.NOT_AUTH)
|
|
|
.build();
|
|
.build();
|
|
|
save(user);
|
|
save(user);
|
|
|
- if (body.getAuthStatus().equals(AuthStatus.SUCCESS)){
|
|
|
|
|
- IdentityAuth identityAuth = IdentityAuth.builder()
|
|
|
|
|
- .autoValidated(true)
|
|
|
|
|
- .idNo(body.getIdNo())
|
|
|
|
|
- .phone(phone)
|
|
|
|
|
- .realName(body.getRealName())
|
|
|
|
|
- .status(body.getAuthStatus())
|
|
|
|
|
- .userId(user.getId())
|
|
|
|
|
- .build();
|
|
|
|
|
- identityAuth = identityAuthRepo.save(identityAuth);
|
|
|
|
|
- user.setAuthStatus(body.getAuthStatus());
|
|
|
|
|
- user.setAuthId(identityAuth.getId());
|
|
|
|
|
- if (body.getIsUserBankCard()){
|
|
|
|
|
- user.setIsUserBankCard(body.getIsUserBankCard());
|
|
|
|
|
- user.setMemberId("1");
|
|
|
|
|
- user.setSettleAccountId("1");
|
|
|
|
|
- save(user);
|
|
|
|
|
- BankValidate bankValidate = BankUtils.validate(body.getBankNo());
|
|
|
|
|
- userBankCardRepo.save(UserBankCard.builder()
|
|
|
|
|
- .bank(bankValidate.getBank())
|
|
|
|
|
- .bankName(bankValidate.getBankName())
|
|
|
|
|
- .bankNo(body.getBankNo())
|
|
|
|
|
- .cardType(bankValidate.getCardType())
|
|
|
|
|
- .cardTypeDesc(bankValidate.getCardTypeDesc())
|
|
|
|
|
- .userId(user.getId())
|
|
|
|
|
- .phone(phone)
|
|
|
|
|
- .realName(identityAuth.getRealName())
|
|
|
|
|
- .idNo(identityAuth.getIdNo())
|
|
|
|
|
- .build());
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (body.getAuthStatus().equals(AuthStatus.SUCCESS)){
|
|
|
|
|
+// IdentityAuth identityAuth = IdentityAuth.builder()
|
|
|
|
|
+// .autoValidated(true)
|
|
|
|
|
+// .idNo(body.getIdNo())
|
|
|
|
|
+// .phone(phone)
|
|
|
|
|
+// .realName(body.getRealName())
|
|
|
|
|
+// .status(body.getAuthStatus())
|
|
|
|
|
+// .userId(user.getId())
|
|
|
|
|
+// .build();
|
|
|
|
|
+// identityAuth = identityAuthRepo.save(identityAuth);
|
|
|
|
|
+// user.setAuthStatus(body.getAuthStatus());
|
|
|
|
|
+// user.setAuthId(identityAuth.getId());
|
|
|
|
|
+// if (body.getIsUserBankCard()){
|
|
|
|
|
+// user.setIsUserBankCard(body.getIsUserBankCard());
|
|
|
|
|
+// user.setMemberId("1");
|
|
|
|
|
+// user.setSettleAccountId("1");
|
|
|
|
|
+// BankValidate bankValidate = BankUtils.validate(body.getBankNo());
|
|
|
|
|
+// userBankCardRepo.save(UserBankCard.builder()
|
|
|
|
|
+// .bank(bankValidate.getBank())
|
|
|
|
|
+// .bankName(bankValidate.getBankName())
|
|
|
|
|
+// .bankNo(body.getBankNo())
|
|
|
|
|
+// .cardType(bankValidate.getCardType())
|
|
|
|
|
+// .cardTypeDesc(bankValidate.getCardTypeDesc())
|
|
|
|
|
+// .userId(user.getId())
|
|
|
|
|
+// .phone(phone)
|
|
|
|
|
+// .realName(identityAuth.getRealName())
|
|
|
|
|
+// .idNo(identityAuth.getIdNo())
|
|
|
|
|
+// .build());
|
|
|
|
|
+// }
|
|
|
|
|
+// save(user);
|
|
|
|
|
+// }
|
|
|
}else {
|
|
}else {
|
|
|
user = create(UserRegister.builder()
|
|
user = create(UserRegister.builder()
|
|
|
.authorities(Collections.singleton(Authority.get(AuthorityName.ROLE_USER)))
|
|
.authorities(Collections.singleton(Authority.get(AuthorityName.ROLE_USER)))
|