diff --git a/platformapi/ebaiapi/store_page.go b/platformapi/ebaiapi/store_page.go index fc4103d5..11fcafea 100644 --- a/platformapi/ebaiapi/store_page.go +++ b/platformapi/ebaiapi/store_page.go @@ -78,9 +78,9 @@ func (a *API) AccessStorePage(subURL string) (retVal map[string]interface{}, err return platformapi.ErrLevelSuccess, nil } newErr := utils.NewErrorIntCode(jsonResult1["errmsg"].(string), code) - // if code == ResponseCodeCallElmFailed { - // return platformapi.ErrLevelRecoverableErr, newErr - // } + if code == ResponseCodeCallElmFailed { + return platformapi.ErrLevelRecoverableErr, newErr + } baseapi.SugarLogger.Debugf("ebai AccessStorePage failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) return platformapi.ErrLevelCodeIsNotOK, newErr }) @@ -139,11 +139,15 @@ func (a *API) GetStoreOrderInfoList(fromTime, toTime string, shopID string, orde return nil, err } -func (a *API) GetEleCommentList(fromTime, toTime time.Time, shopID, supplierID string, replyStatus, level, nonEmpty int) (commentList []map[string]interface{}, err error) { +func (a *API) getCommentList(isElm bool, fromTime, toTime time.Time, shopID, supplierID string, replyStatus, level, nonEmpty int) (commentList []map[string]interface{}, err error) { pageSize := 200 pageNo := 1 - urlTemplate := "crm/getelecommentlist?start_time=%s&end_time=%s&page_count=%d" + urlTemplate := "crm/%s?start_time=%s&end_time=%s&page_count=%d" params := []interface{}{ + []string{ + "getelecommentlist", + "getcommentlist", + }[1-utils.Bool2Int(isElm)], utils.Time2Str(fromTime), utils.Time2Str(toTime), pageSize, @@ -190,3 +194,11 @@ func (a *API) GetEleCommentList(fromTime, toTime time.Time, shopID, supplierID s } return nil, err } + +func (a *API) GetEleCommentList(fromTime, toTime time.Time, shopID, supplierID string, replyStatus, level, nonEmpty int) (commentList []map[string]interface{}, err error) { + return a.getCommentList(true, fromTime, toTime, shopID, supplierID, replyStatus, level, nonEmpty) +} + +func (a *API) GetCommentList(fromTime, toTime time.Time, shopID, supplierID string, replyStatus, level, nonEmpty int) (commentList []map[string]interface{}, err error) { + return a.getCommentList(false, fromTime, toTime, shopID, supplierID, replyStatus, level, nonEmpty) +}