update m2pool 注销用户接口相关查询新增del_flag条件,开启注销用户谷歌验证
This commit is contained in:
@@ -591,10 +591,9 @@ public class SysLoginService {
|
|||||||
throw new ServiceException("验证码未获取或已过期,请重新获取验证码");
|
throw new ServiceException("验证码未获取或已过期,请重新获取验证码");
|
||||||
}
|
}
|
||||||
R<Boolean> booleanR1 = remoteUserService.checkGoogleCode(closeAccountVo, SecurityConstants.INNER);
|
R<Boolean> booleanR1 = remoteUserService.checkGoogleCode(closeAccountVo, SecurityConstants.INNER);
|
||||||
System.out.println("谷歌验证码"+booleanR1);
|
if(booleanR1 == null || !booleanR1.getData()){
|
||||||
//if(booleanR1 == null || !booleanR1.getData()){
|
throw new ServiceException("谷歌验证码错误");
|
||||||
// throw new ServiceException("谷歌验证码错误");
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
R<LoginUser> userInfo = remoteUserService.getUserInfo(SecurityUtils.getUsername(), SecurityConstants.INNER);
|
R<LoginUser> userInfo = remoteUserService.getUserInfo(SecurityUtils.getUsername(), SecurityConstants.INNER);
|
||||||
if (R.FAIL == userInfo.getCode()) {
|
if (R.FAIL == userInfo.getCode()) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
google_auth = #{info.secret},
|
google_auth = #{info.secret},
|
||||||
google_status = #{info.status},
|
google_status = #{info.status},
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
where user_name = #{info.email}
|
where user_name = #{info.email} and del_flag = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="checkIfBindByEmail" resultType="java.lang.Boolean">
|
<select id="checkIfBindByEmail" resultType="java.lang.Boolean">
|
||||||
@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from
|
from
|
||||||
sys_user
|
sys_user
|
||||||
where
|
where
|
||||||
email = #{email}
|
email = #{email} AND del_flag = 0
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -399,14 +399,10 @@ public class SysUserServiceImpl implements SysUserService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//没有绑定谷歌验证器 校验直接通过
|
//没有绑定谷歌验证器 校验直接通过
|
||||||
if(StringUtils.isBlank(info.getSecret())){
|
if(StringUtils.isBlank(info.getSecret()) || info.getStatus() == 0){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//没有绑定谷歌验证器 校验直接通过
|
|
||||||
if(info.getStatus() == 0){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(GoogleAuthenticator.checkCode(info.getSecret(), code, System.currentTimeMillis())){
|
if(GoogleAuthenticator.checkCode(info.getSecret(), code, System.currentTimeMillis())){
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
from
|
from
|
||||||
sys_user
|
sys_user
|
||||||
where
|
where
|
||||||
user_name = #{email}
|
user_name = #{email} AND del_flag = '0'
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="getCSList" resultType="com.m2pool.system.api.entity.SysUser">
|
<select id="getCSList" resultType="com.m2pool.system.api.entity.SysUser">
|
||||||
|
|||||||
Reference in New Issue
Block a user