浏览代码

Merge branch 'hotfix/bug7251_login_fail' into debug

xyxie 1 周之前
父节点
当前提交
a52e06c52a
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. 4 1
      controllers/sys_admin.go
  2. 3 0
      utils/constants.go

+ 4 - 1
controllers/sys_admin.go

@@ -1325,9 +1325,12 @@ func (this *SysAdminController) ResetPass() {
 	_ = utils.Rc.Delete(utils.CACHE_KEY_ADMIN_ID)
 	abnormalKey := fmt.Sprint(utils.CACHE_ABNORMAL_LOGIN, adminInfo.AdminName)
 	errPassKey := fmt.Sprint(utils.CACHE_LOGIN_ERR_PASS, adminInfo.AdminName)
+	mobileAbnormalKey := fmt.Sprint(utils.MOBILE_CACHE_ABNORMAL_LOGIN, adminInfo.Mobile)
+	mobileErrPassKey := fmt.Sprint(utils.MOBILE_CACHE_LOGIN_ERR_PASS, adminInfo.Mobile)
 	_ = utils.Rc.Delete(abnormalKey)
 	_ = utils.Rc.Delete(errPassKey)
-
+	_ = utils.Rc.Delete(mobileAbnormalKey)
+	_ = utils.Rc.Delete(mobileErrPassKey)
 	br.Ret = 200
 	br.Success = true
 	br.IsAddLog = true

+ 3 - 0
utils/constants.go

@@ -237,6 +237,9 @@ const (
 	CACHE_ACCESS_TOKEN_LOGIN_NO_TRUST = "pc_eta_admin:login:no_trust:"        //管理后台登录(不可信登录态)
 	CACHE_ABNORMAL_LOGIN              = "pc_eta_admin:login:abnormal:"        //管理后台登录-异常登录
 	CACHE_LOGIN_ERR_PASS              = "pc_eta_admin:login:errPass:"         //管理后台登录-输入错误密码次数
+	MOBILE_CACHE_ABNORMAL_LOGIN       = "mobile_eta_admin:login:abnormal:"        //管理后台登录-异常登录
+	MOBILE_CACHE_LOGIN_ERR_PASS             = "mobile_eta_admin:login:errPass:"         //管理后台登录-输入错误密码次数
+
 	CACHE_FIND_PASS_VERIFY            = "pc_eta_admin:findPass:verify:"       //找回密码校验成功标记
 	CACHE_KEY_MYSTEEL_REFRESH         = "mysteel_chemical:refresh"            //上海钢联刷新
 	CACHE_KEY_DAYNEW_REFRESH          = "admin:day_new:refresh"               //每日资讯拉取企业微信聊天记录