update m2pool 注销账号后新注册修改

This commit is contained in:
yyb
2026-01-04 17:31:13 +08:00
parent 89bf55b4ce
commit dccbb10512
4 changed files with 11 additions and 8 deletions

View File

@@ -593,9 +593,10 @@ 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);
if((booleanR1 != null && booleanR1.getData() == null) || !booleanR1.getData()){ System.out.println("谷歌验证码"+booleanR1);
throw new ServiceException("谷歌验证码错误"); //if(booleanR1 == null || !booleanR1.getData()){
} // 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()) {

View File

@@ -1,5 +1,6 @@
package com.m2pool.system.controller; package com.m2pool.system.controller;
import com.alibaba.druid.support.json.JSONUtils;
import com.m2pool.common.core.Result.R; import com.m2pool.common.core.Result.R;
import com.m2pool.common.core.constant.UserConstants; import com.m2pool.common.core.constant.UserConstants;
import com.m2pool.common.core.utils.StringUtils; import com.m2pool.common.core.utils.StringUtils;
@@ -62,6 +63,7 @@ public class SysUserController extends BaseController {
SysUser user = userService.selectUserByEmail(account); SysUser user = userService.selectUserByEmail(account);
System.out.println("用户信息"+ user);
if (StringUtils.isNull(user)) if (StringUtils.isNull(user))
{ {
return R.fail("邮箱未被注册"); return R.fail("邮箱未被注册");

View File

@@ -403,7 +403,7 @@ public class SysUserServiceImpl implements SysUserService {
if(GoogleAuthenticator.checkCode(info.getSecret(), code, System.currentTimeMillis())){ if(GoogleAuthenticator.checkCode(info.getSecret(), code, System.currentTimeMillis())){
return true; return true;
}else { }else {
throw new ServiceException("谷歌验证码错误"); return false;
} }
} }

View File

@@ -90,12 +90,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/> <include refid="selectUserVo"/>
where u.user_name = #{userName} where u.user_name = #{userName} AND u.del_flag = '0'
</select> </select>
<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult"> <select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/> <include refid="selectUserVo"/>
where u.email = #{email} where u.email = #{email} and u.del_flag = '0'
</select> </select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="checkUserNameUnique" parameterType="String" resultType="int"> <select id="checkUserNameUnique" parameterType="String" resultType="int">
select count(1) from sys_user where user_name = #{userName} limit 1 select count(1) from sys_user where user_name = #{userName} and del_flag = '0' limit 1
</select> </select>
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult"> <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
select user_id, email from sys_user where email = #{email} limit 1 select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select> </select>
<select id="checkEmailExist" parameterType="String" resultType="string"> <select id="checkEmailExist" parameterType="String" resultType="string">