diff --git a/platformapi/ebaiapi/store_page.go b/platformapi/ebaiapi/store_page.go index 4f70aa42..3836a26e 100644 --- a/platformapi/ebaiapi/store_page.go +++ b/platformapi/ebaiapi/store_page.go @@ -3,6 +3,7 @@ package ebaiapi import ( "fmt" "net/http" + "time" "git.rosy.net.cn/baseapi" "git.rosy.net.cn/baseapi/platformapi" @@ -135,13 +136,13 @@ func (a *API) GetStoreOrderInfoList(fromTime, toTime string, shopID string, orde return nil, err } -func (a *API) GetEleCommentList(fromTime, toTime string, shopID, supplierID string, replyStatus, level, nonEmpty int) (commentList []map[string]interface{}, err error) { +func (a *API) GetEleCommentList(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" params := []interface{}{ - fromTime, - toTime, + utils.Time2Str(fromTime), + utils.Time2Str(toTime), pageSize, } if shopID != "" { diff --git a/platformapi/ebaiapi/store_page_test.go b/platformapi/ebaiapi/store_page_test.go index 25f677c3..62bd8038 100644 --- a/platformapi/ebaiapi/store_page_test.go +++ b/platformapi/ebaiapi/store_page_test.go @@ -42,7 +42,7 @@ func TestGetStoreOrderInfoList(t *testing.T) { } func TestGetEleCommentList(t *testing.T) { - commentList, err := api.GetEleCommentList("2019-02-14 13:00:00", "2019-02-15 15:30:00", "", "", ReplyStatusAll, CommentLevelAll, CommentContentAll) + commentList, err := api.GetEleCommentList(utils.Str2Time("2019-02-25 00:00:00"), utils.Str2Time("2019-02-25 23:30:00"), "", "", ReplyStatusAll, CommentLevelAll, CommentContentAll) if err != nil { t.Fatal(err) }