增加万能验证码
This commit is contained in:
parent
88bb7e54a5
commit
317f761aea
|
|
@ -883,9 +883,12 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
if(StringUtils.isEmpty(msg)){
|
||||
return Result.error("验证码不能为空!");
|
||||
}
|
||||
Msg msg1 = msgDao.findByPhoneAndCode(phone, msg);
|
||||
if(msg1==null){
|
||||
return Result.error("验证码不正确!");
|
||||
Msg msg1 = null;
|
||||
if (!"147258".equals(msg)) {
|
||||
msg1 = msgDao.findByPhoneAndCode(phone, msg);
|
||||
if (msg1 == null) {
|
||||
return Result.error("验证码不正确!");
|
||||
}
|
||||
}
|
||||
userInfo = new UserEntity();
|
||||
UserEntity userEntity=null;
|
||||
|
|
@ -925,7 +928,9 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
baseMapper.insert(userInfo);
|
||||
userInfo.setInvitationCode(InvitationCodeUtil.toSerialCode(userInfo.getUserId()));
|
||||
baseMapper.updateById(userInfo);
|
||||
msgDao.deleteById(msg1.getId());
|
||||
if (msg1 != null) {
|
||||
msgDao.deleteById(msg1.getId());
|
||||
}
|
||||
if(userEntity!=null){
|
||||
inviteService.saveBody(userInfo.getUserId(),userEntity);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue