- retry when 2101 for ebai page access
This commit is contained in:
@@ -22,7 +22,8 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ResponseCodeSuccess = 0
|
ResponseCodeSuccess = 0
|
||||||
|
ResponseCodeCallElmFailed = 2101 // 这个可以尝试重试
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ func (a *API) AccessStorePage(subURL string) (retVal map[string]interface{}, err
|
|||||||
return platformapi.ErrLevelSuccess, nil
|
return platformapi.ErrLevelSuccess, nil
|
||||||
}
|
}
|
||||||
newErr := utils.NewErrorIntCode(jsonResult1["errmsg"].(string), code)
|
newErr := utils.NewErrorIntCode(jsonResult1["errmsg"].(string), code)
|
||||||
|
if code == ResponseCodeCallElmFailed {
|
||||||
|
return platformapi.ErrLevelRecoverableErr, newErr
|
||||||
|
}
|
||||||
baseapi.SugarLogger.Debugf("ebai AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
baseapi.SugarLogger.Debugf("ebai AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
||||||
return platformapi.ErrLevelCodeIsNotOK, newErr
|
return platformapi.ErrLevelCodeIsNotOK, newErr
|
||||||
})
|
})
|
||||||
@@ -173,6 +176,7 @@ func (a *API) GetEleCommentList(fromTime, toTime time.Time, shopID, supplierID s
|
|||||||
for _, orderComment := range commentMap["order_commentList"].([]interface{}) {
|
for _, orderComment := range commentMap["order_commentList"].([]interface{}) {
|
||||||
orderCommentMap := orderComment.(map[string]interface{})
|
orderCommentMap := orderComment.(map[string]interface{})
|
||||||
orderCommentMap["order_id"] = commentMap["order_id"]
|
orderCommentMap["order_id"] = commentMap["order_id"]
|
||||||
|
orderCommentMap["shop_id"] = commentMap["shop_id"]
|
||||||
commentList = append(commentList, orderComment.(map[string]interface{}))
|
commentList = append(commentList, orderComment.(map[string]interface{}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user