Merge pull request 'feat-IRONFANS-248-Robin' (#841) from feat-IRONFANS-248-Robin into test
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/841
This commit is contained in:
commit
01dfa921f5
|
@ -111,6 +111,16 @@ func (l *LoginBusinessValidator) EnsureVeriCodeWrongTimesNotReachedDailyUpperbou
|
|||
l.oplist = append(l.oplist, func() {
|
||||
|
||||
if l.login != nil {
|
||||
|
||||
wrongTimes, err := fun(l.ctx, l.login.GetMid())
|
||||
if err != nil {
|
||||
l.ec = errcode.ErrCodeVeriCodeWrongTimesSrvFail
|
||||
return
|
||||
}
|
||||
if wrongTimes == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// 读取每日错误上限
|
||||
maxDailyWrongTimes, err := apollo.GetIntValue(consts.MaxVeriCodeWrongTimesKey, apollo.ApolloOpts().SetNamespace("application"))
|
||||
if err != nil {
|
||||
|
@ -119,12 +129,6 @@ func (l *LoginBusinessValidator) EnsureVeriCodeWrongTimesNotReachedDailyUpperbou
|
|||
return
|
||||
}
|
||||
|
||||
wrongTimes, err := fun(l.ctx, l.login.GetMid())
|
||||
if err != nil {
|
||||
l.ec = errcode.ErrCodeVeriCodeWrongTimesSrvFail
|
||||
return
|
||||
}
|
||||
|
||||
if wrongTimes.WrongTimes >= int64(maxDailyWrongTimes) {
|
||||
logger.Error("wrongs times of verification code of this mid has reached its daily upperbound")
|
||||
l.ec = errcode.ErrCodeVeriCodeWrongTimesReachedDailyUpperbound
|
||||
|
|
Loading…
Reference in New Issue