手机号授权: 重置密码相关toast提示
This commit is contained in:
@@ -142,6 +142,9 @@ public enum OAuthStatus {
|
||||
ACCOUNT_CANCEL_INFO_NOT_EXIST(3010, "獲取不到賬號註銷信息"),
|
||||
PWD_WRONG_OVER_LIMIT(3011, "密碼錯誤次數過多,請10分鐘后重試"),
|
||||
|
||||
PHONE_BIND_ERROR(3012, "绑定手机号错误,请重新输入"),
|
||||
ACCOUNT_NOT_BIND_PHONE(3013, "未绑定手机号"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
@@ -428,9 +428,16 @@ public class AccountManageService {
|
||||
* @return 1:成功 2:重置码无效 3:用户不存在
|
||||
*/
|
||||
public OAuthStatus resetPasswordByResetCode(Long uid, String phone, String password, String resetCode) throws Exception {
|
||||
Account accountUser = accountService.getById(uid);
|
||||
if (accountUser == null) {
|
||||
return OAuthStatus.USER_NOT_EXISTED;
|
||||
}
|
||||
if (!CommonUtil.checkPhoneFormat(accountUser.getPhoneAreaCode(),accountUser.getPhone())) {
|
||||
return OAuthStatus.ACCOUNT_NOT_BIND_PHONE;
|
||||
}
|
||||
Account account = accountService.getAccountByPhone(phone);
|
||||
if (null == account || !account.getUid().equals(uid)) {
|
||||
return OAuthStatus.USER_NOT_EXISTED;
|
||||
return OAuthStatus.PHONE_BIND_ERROR;
|
||||
}
|
||||
//检验验证码
|
||||
if (accountService.verifySmsCodeByCache(phone, resetCode,account.getUid())) {
|
||||
|
Reference in New Issue
Block a user