- change time format of GetEleCommentList to time.Time
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user