From 33231bed632d3ce887ab7f471913e828491a9125 Mon Sep 17 00:00:00 2001 From: yyb <1416014977@qq.com> Date: Wed, 21 Jan 2026 15:12:55 +0800 Subject: [PATCH] =?UTF-8?q?update=20m2pool=20=E5=8F=8C=E9=87=8D=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E9=97=AE=E9=A2=98=E5=AF=BC=E8=87=B4=E7=9A=84=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=B7=BB=E5=8A=A0=E6=8C=96=E7=9F=BF=E8=B4=A6=E6=88=B7?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/m2pool/pool/mapper/GoogleAuthMapper.java | 2 +- .../pool/service/impl/GoogleAuthServiceImpl.java | 2 +- .../pool/service/impl/UserMinerServiceImpl.java | 12 ++++++------ .../main/resources/mapper/pool/GoogleAuthMapper.xml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/mapper/GoogleAuthMapper.java b/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/mapper/GoogleAuthMapper.java index d33e492..5853411 100644 --- a/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/mapper/GoogleAuthMapper.java +++ b/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/mapper/GoogleAuthMapper.java @@ -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); diff --git a/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/GoogleAuthServiceImpl.java b/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/GoogleAuthServiceImpl.java index 9f1c939..1eca74b 100644 --- a/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/GoogleAuthServiceImpl.java +++ b/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/GoogleAuthServiceImpl.java @@ -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"); } diff --git a/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/UserMinerServiceImpl.java b/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/UserMinerServiceImpl.java index d6362b5..8a476b3 100644 --- a/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/UserMinerServiceImpl.java +++ b/m2pool-modules/m2pool-pool/src/main/java/com/m2pool/pool/service/impl/UserMinerServiceImpl.java @@ -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("您的账号未开启双重验证,请先开启验证!"); } diff --git a/m2pool-modules/m2pool-pool/src/main/resources/mapper/pool/GoogleAuthMapper.xml b/m2pool-modules/m2pool-pool/src/main/resources/mapper/pool/GoogleAuthMapper.xml index fce9ff0..a18bdfe 100644 --- a/m2pool-modules/m2pool-pool/src/main/resources/mapper/pool/GoogleAuthMapper.xml +++ b/m2pool-modules/m2pool-pool/src/main/resources/mapper/pool/GoogleAuthMapper.xml @@ -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