Commit 1a2bcf6a authored by dongyu's avatar dongyu

驳回重新注册修改

parent a9267907
......@@ -154,6 +154,10 @@ public class UserController {
@PostMapping("/checkUser")
public AjaxResult checkUser(@RequestBody ForgotPasswordVo forgotPasswordVo){
UserInfo userInfo = userInfoService.selectUserByNumber(forgotPasswordVo.getPhone());
// 驳回重新注册修改用户状态
if("0".equals(forgotPasswordVo.getType())&&ObjectUtils.isNotEmpty(userInfo)&&userInfo.getAccountStatus().equals("2")){
userInfoService.updateUserInfoById(userInfo.getUserId());
}
if("0".equals(forgotPasswordVo.getType())&&ObjectUtils.isNotEmpty(userInfo)&&userInfo.getAccountStatus().equals("1")){
return AjaxResult.error("当前手机号码已注册");
}
......
......@@ -72,4 +72,6 @@ public interface UserInfoMapper {
UserInfo selectUserByNumber(String userName);
Integer forgotPassword(String phone, String passWord);
void updateUserInfoById(String userId,String accountStatus);
}
......@@ -93,4 +93,6 @@ public interface UserInfoService {
UserInfo selectUserByNumber(String userName);
AjaxResult forgotPassword(ForgotPasswordVo forgotPasswordVo);
void updateUserInfoById(String userId);
}
......@@ -217,4 +217,9 @@ public class UserInfoServiceImpl implements UserInfoService {
}
return AjaxResult.success("修改成功");
}
@Override
public void updateUserInfoById(String userId) {
userInfoMapper.updateUserInfoById(userId,"0");
}
}
......@@ -105,5 +105,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where account = #{phone}
</update>
<update id="updateUserInfoById" >
update sup_user_info
<set>
update_time = now(),
<if test="accountStatus != null and accountStatus !=''">account_status = #{accountStatus},</if>
</set>
where user_id = #{userId}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment