From 248aa38c12a393d12c5ab721ee75fbd5c7dfbb9f Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期四, 18 四月 2019 12:31:28 +0800 Subject: [PATCH] Merge branch 'div' --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java | 42 +++++++++++++++++++++++------------------- 1 files changed, 23 insertions(+), 19 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java index bce6af0..5458278 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java @@ -27,6 +27,7 @@ import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode; import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum; import com.yeshi.fanli.entity.bus.user.LoginResult; +import com.yeshi.fanli.entity.bus.user.SMSHistory; import com.yeshi.fanli.entity.bus.user.ThreeSale; import com.yeshi.fanli.entity.bus.user.UserAccountBindingHistory; import com.yeshi.fanli.entity.bus.user.UserConnectHistory; @@ -915,26 +916,22 @@ } phone = phone.replaceAll(" ", ""); - // // 鑻规灉搴旂敤鍟嗗簵涓婄嚎娴嬭瘯鍙风爜 - // if ("17316780233".equalsIgnoreCase(phone) && - // "258168".equalsIgnoreCase(vcode)) { - // ; - // } else { - // - // if (StringUtil.isNullOrEmpty(vcode)) { - // throw new UserAccountException(1, "璇疯緭鍏ラ獙璇佺爜"); - // } - // - // String oldVcode = redisManager.getSMSVCode(phone, - // SMSHistory.TYPE_LOGIN); - // LogHelper.test("----------------------鐧诲綍楠岃瘉鐮侊細 " + oldVcode); - // if (StringUtil.isNullOrEmpty(oldVcode) || - // !oldVcode.equalsIgnoreCase(vcode)) { - // throw new UserAccountException(1, "楠岃瘉鐮侀敊璇紝閲嶆柊杈撳叆"); - // } - // } - // redisManager.clearSMSFrequencyLimit(phone, SMSHistory.TYPE_LOGIN); + // 鑻规灉搴旂敤鍟嗗簵涓婄嚎娴嬭瘯鍙风爜 + if ("17316780233".equalsIgnoreCase(phone) && "258168".equalsIgnoreCase(vcode)) { + ; + } else { + if (StringUtil.isNullOrEmpty(vcode)) { + throw new UserAccountException(1, "璇疯緭鍏ラ獙璇佺爜"); + } + + String oldVcode = redisManager.getSMSVCode(phone, SMSHistory.TYPE_LOGIN); + LogHelper.test("----------------------鐧诲綍楠岃瘉鐮侊細 " + oldVcode); + if (StringUtil.isNullOrEmpty(oldVcode) || !oldVcode.equalsIgnoreCase(vcode)) { + throw new UserAccountException(1, "楠岃瘉鐮侀敊璇紝閲嶆柊杈撳叆"); + } + } + JSONObject logInfo = new JSONObject(); logInfo.put("appId", appId); logInfo.put("phone", phone); @@ -947,6 +944,13 @@ if (identifyCode1 != null && identifyCode1.getEffective() != null && identifyCode1.getEffective()) { throw new UserAccountException(Constant.CODE_FORBIDDEN_USER, Constant.FORBIDDEN_USER_REASON_DESC); } + + + // 娓呯┖闄愬埗 + redisManager.clearSMSFrequencyLimit(phone, SMSHistory.TYPE_LOGIN); + // 娓呯悊娆℃暟 + redisManager.removeCommonString("sendMSNLoginCount" + phone); + // 鏌ヨ鏄惁瀛樺湪璇ョ數璇濆巻鍙茬敤鎴� UserInfo userInfo = userInfoMapper.getEffectiveUserInfoByPhone(phone); -- Gitblit v1.8.0