|
@@ -381,6 +381,10 @@ public class LoginServiceImpl implements LoginService {
|
|
String smsCode = scanBindDto.getSmsCode();
|
|
String smsCode = scanBindDto.getSmsCode();
|
|
String linkName = scanBindDto.getLinkName();
|
|
String linkName = scanBindDto.getLinkName();
|
|
String unionId = scanBindDto.getUnionId();
|
|
String unionId = scanBindDto.getUnionId();
|
|
|
|
+ // 参数校验
|
|
|
|
+ if (StringUtils.isBlank(mobileOrEmail) || StringUtils.isBlank(password) || StringUtils.isBlank(mobile) || StringUtils.isBlank(smsCode) || StringUtils.isBlank(unionId)) {
|
|
|
|
+ return ResponseJson.error("参数异常", null);
|
|
|
|
+ }
|
|
//处理比对密码
|
|
//处理比对密码
|
|
UserLoginVo user = loginMapper.getLoginUserByMobileOrEmail(mobileOrEmail);
|
|
UserLoginVo user = loginMapper.getLoginUserByMobileOrEmail(mobileOrEmail);
|
|
String md5Password = Md5Util.md5(password);
|
|
String md5Password = Md5Util.md5(password);
|
|
@@ -538,7 +542,7 @@ public class LoginServiceImpl implements LoginService {
|
|
String nickName = authBindDto.getNickName();
|
|
String nickName = authBindDto.getNickName();
|
|
String avatarUrl = authBindDto.getAvatarUrl();
|
|
String avatarUrl = authBindDto.getAvatarUrl();
|
|
// 参数校验
|
|
// 参数校验
|
|
- if (null == userId || StringUtils.isBlank(mobile) || StringUtils.isBlank(smsCode)) {
|
|
|
|
|
|
+ if (null == userId || StringUtils.isBlank(mobile) || StringUtils.isBlank(smsCode) || StringUtils.isBlank(unionId)) {
|
|
return ResponseJson.error("参数异常", null);
|
|
return ResponseJson.error("参数异常", null);
|
|
}
|
|
}
|
|
// 查询使用该手机号的运营人员或用户
|
|
// 查询使用该手机号的运营人员或用户
|
|
@@ -603,12 +607,8 @@ public class LoginServiceImpl implements LoginService {
|
|
* 查询使用该手机号的运营人员或用户
|
|
* 查询使用该手机号的运营人员或用户
|
|
*/
|
|
*/
|
|
private String operationBindCheck(String mobile, String smsCode) {
|
|
private String operationBindCheck(String mobile, String smsCode) {
|
|
- String redisSmsCode = (String) redisService.get("code:" + mobile);
|
|
|
|
- if (redisSmsCode == null || !redisSmsCode.equals(smsCode)) {
|
|
|
|
- return "手机验证码错误";
|
|
|
|
- }
|
|
|
|
// 手机号验证
|
|
// 手机号验证
|
|
- String result = commonService.mobileAndCodeValidate(mobile, null);
|
|
|
|
|
|
+ String result = commonService.mobileAndCodeValidate(mobile, smsCode);
|
|
if (result != null) {
|
|
if (result != null) {
|
|
// 查询使用该手机号的运营人员或用户
|
|
// 查询使用该手机号的运营人员或用户
|
|
UserLoginVo dbUser = loginMapper.getLoginUserByMobile(mobile);
|
|
UserLoginVo dbUser = loginMapper.getLoginUserByMobile(mobile);
|