注册 渠道不存在时
This commit is contained in:
parent
5f68d4f4ad
commit
2a25a4792b
|
|
@ -144,7 +144,7 @@ public class AppLoginController {
|
|||
@RequestMapping(value = "/registerCode", method = RequestMethod.POST)
|
||||
@ApiOperation("app或h5注册或登录")
|
||||
@ResponseBody
|
||||
// @Debounce(interval = 2500, value = "phone")
|
||||
@Debounce(interval = 2500, value = "#phone")
|
||||
public Result registerCode(@RequestParam String phone,String msg,String platform,Integer sysPhone,
|
||||
String password,String inviterCode,String wxId,String qdCode) {
|
||||
return userService.registerCode(phone,msg,platform,sysPhone,password,inviterCode,wxId,qdCode);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ import com.sqx.modules.file.utils.Md5Utils;
|
|||
import com.sqx.modules.invite.service.InviteService;
|
||||
import com.sqx.modules.message.entity.MessageInfo;
|
||||
import com.sqx.modules.message.service.MessageService;
|
||||
import com.sqx.modules.sys.entity.SysUserEntity;
|
||||
import com.sqx.modules.sys.service.SysUserService;
|
||||
import com.sqx.modules.utils.HttpClientUtil;
|
||||
import com.sqx.modules.utils.InvitationCodeUtil;
|
||||
import com.sqx.modules.utils.MD5Util;
|
||||
|
|
@ -110,6 +112,8 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
private CommonInfoService commonRepository;
|
||||
@Autowired
|
||||
private DiscSpinningService discSpinningService;
|
||||
@Autowired
|
||||
private SysUserService sysUserService;
|
||||
private ReentrantReadWriteLock reentrantReadWriteLock = new ReentrantReadWriteLock(true);
|
||||
|
||||
@Override
|
||||
|
|
@ -896,12 +900,9 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
if (StringUtils.isEmpty(msg)) {
|
||||
return Result.error("验证码不能为空!");
|
||||
}
|
||||
Msg msg1 = null;
|
||||
if (!"147258".equals(msg)) {
|
||||
msg1 = msgDao.findByPhoneAndCode(phone, msg);
|
||||
if (msg1 == null) {
|
||||
return Result.error("验证码不正确!");
|
||||
}
|
||||
Msg msg1 = msgDao.findByPhoneAndCode(phone, msg);
|
||||
if (msg1 == null) {
|
||||
return Result.error("验证码不正确!");
|
||||
}
|
||||
userInfo = new UserEntity();
|
||||
UserEntity userEntity = null;
|
||||
|
|
@ -921,6 +922,11 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
}
|
||||
if (StringUtils.isEmpty(qdCode)) {
|
||||
qdCode = userEntity.getQdCode();
|
||||
} else {
|
||||
SysUserEntity sysUserEntity = sysUserService.selectSysUserByQdCode(qdCode);
|
||||
if (sysUserEntity == null) {
|
||||
return Result.error("请使用正确的渠道码!");
|
||||
}
|
||||
}
|
||||
userInfo.setQdCode(qdCode);
|
||||
userInfo.setPhone(phone);
|
||||
|
|
|
|||
Loading…
Reference in New Issue