update m2pool 双重验证问题导致的无法添加挖矿账户问题修复
This commit is contained in:
@@ -31,7 +31,7 @@ public interface GoogleAuthMapper {
|
||||
* @param email
|
||||
* @return
|
||||
*/
|
||||
public GoogleInfo getGoogleInfoByEmail(@Param("email") String email);
|
||||
public GoogleInfo getGoogleInfoByEmail(@Param("email") String email, @Param("isClose") Integer isClose);
|
||||
|
||||
public UserGoogleAuthInfo getUserInfoByEmail(@Param("email") String email);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class GoogleAuthServiceImpl implements GoogleAuthService {
|
||||
if(StringUtils.isNull(email)){
|
||||
return AjaxResult.error("token解析异常");
|
||||
}
|
||||
GoogleInfo info = googleAuthMapper.getGoogleInfoByEmail(email);
|
||||
GoogleInfo info = googleAuthMapper.getGoogleInfoByEmail(email,0);
|
||||
if (StringUtils.isNull(info)){
|
||||
return AjaxResult.error("未能从token获取到所需内容,请勿擅自修改token");
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ public class UserMinerServiceImpl implements UserMinserService {
|
||||
|
||||
//查询是否开启双重验证
|
||||
//谷歌验证码校验
|
||||
GoogleInfo googleInfo = googleAuthMapper.getGoogleInfoByEmail(username);
|
||||
if(StringUtils.isBlank(googleInfo.getSecret())){
|
||||
GoogleInfo googleInfo = googleAuthMapper.getGoogleInfoByEmail(username,1);
|
||||
if(googleInfo == null || StringUtils.isBlank(googleInfo.getSecret())){
|
||||
//未绑定定谷歌验证器
|
||||
return AjaxResult.error("您的账号未开启双重验证,请先开启验证!");
|
||||
}
|
||||
@@ -290,8 +290,8 @@ public class UserMinerServiceImpl implements UserMinserService {
|
||||
|
||||
//查询是否开启双重验证
|
||||
//谷歌验证码校验
|
||||
GoogleInfo googleInfo = googleAuthMapper.getGoogleInfoByEmail(username);
|
||||
if(StringUtils.isBlank(googleInfo.getSecret())){
|
||||
GoogleInfo googleInfo = googleAuthMapper.getGoogleInfoByEmail(username,1);
|
||||
if(googleInfo == null || StringUtils.isBlank(googleInfo.getSecret())){
|
||||
//未绑定定谷歌验证器
|
||||
return AjaxResult.error("您的账号未开启双重验证,请先开启验证!");
|
||||
}
|
||||
@@ -341,8 +341,8 @@ public class UserMinerServiceImpl implements UserMinserService {
|
||||
}
|
||||
double amount = PoolAmount.getAmountByCoin(dto.getCoin());
|
||||
|
||||
GoogleInfo googleInfo = googleAuthMapper.getGoogleInfoByEmail(username);
|
||||
if(StringUtils.isBlank(googleInfo.getSecret())){
|
||||
GoogleInfo googleInfo = googleAuthMapper.getGoogleInfoByEmail(username,1);
|
||||
if(googleInfo == null || StringUtils.isBlank(googleInfo.getSecret())){
|
||||
//未绑定定谷歌验证器
|
||||
return AjaxResult.error("您的账号未开启双重验证,请先开启验证!");
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from
|
||||
sys_user
|
||||
where
|
||||
email = #{email} and google_status = 0 and del_flag = 0
|
||||
email = #{email} and google_status = #{isClose} and del_flag = 0
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user