This commit is contained in:
邹宗楠
2023-10-12 17:14:58 +08:00
parent 16dc42708e
commit c09faee574
3 changed files with 10 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
package mtwmapi
import (
"git.rosy.net.cn/jx-callback/globals"
"math"
"strings"
@@ -61,6 +62,12 @@ func (a *API) CommentQuery(poiCode string, startDateStr, endDateStr string, offs
params["pageoffset"] = offset
params["pagesize"] = limit
result, err := a.AccessAPI("comment/query", true, params)
if poiCode == "18805464" {
globals.SugarLogger.Debugf("param :==== %s", utils.Format4Output(params, false))
globals.SugarLogger.Debugf("result :==== %s", utils.Format4Output(result, false))
globals.SugarLogger.Debugf("err :==== %v", err)
globals.SugarLogger.Debugf("token :==== %s", a.token)
}
if err != nil {
return nil, err
}

View File

@@ -8,7 +8,7 @@ import (
)
func TestCommentQuery(t *testing.T) {
result, err := api.CommentQuery("18026738", "20230711", "20230717", 0, 0, CommentReplyStatusNotReplied)
result, err := api.CommentQuery("18805464", "20231009", "20231011", 0, 0, CommentReplyStatusNotReplied)
if err != nil {
t.Fatal(err)
}

View File

@@ -23,10 +23,10 @@ func init() {
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_nngsVP37s-HXY86xe85H7Q") //token_n4TwqCntWWuvQwAawzxC0w
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_rfAD6OxSVxkTeCO1XmNCZg") //token_n4TwqCntWWuvQwAawzxC0w
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_r36FEse6_ywebQI65FNNWA") //token_n4TwqCntWWuvQwAawzxC0w
cookieStr := `
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;