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