update m2pool 双重验证问题导致的无法添加挖矿账户问题修复

This commit is contained in:
yyb
2026-01-21 15:12:55 +08:00
parent ad379bfa58
commit 33231bed63
4 changed files with 9 additions and 9 deletions

View File

@@ -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);

View File

@@ -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");
}

View File

@@ -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("您的账号未开启双重验证,请先开启验证!");
}

View File

@@ -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>