This commit is contained in:
邹宗楠
2025-05-07 15:38:21 +08:00
parent 2c3b478b94
commit 7b827e79a7
3 changed files with 24 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ import (
)
func TestCommentQuery(t *testing.T) {
result, err := api.CommentQuery("23932637", "20240813", "20240819", 0, 0, CommentReplyStatusNotReplied)
result, err := api.CommentQuery("27674533", "20250415", "20250506", 19, 1, CommentReplyStatusAll)
if err != nil {
t.Fatal(err)
}
@@ -26,14 +26,15 @@ func TestCommentQuery(t *testing.T) {
for _, fn := range mtwmComment.CommentOrderDetail {
if len(fn.FoodName)-strings.LastIndex(fn.FoodName, "") > 3 {
foodNameList[fn.FoodName] = 1
foodNameList[strings.TrimSpace(fn.FoodName)] = 1
} else {
foodNameList[fn.FoodName[0:strings.LastIndex(fn.FoodName, "")]] = 1
foodNameList[strings.TrimSpace(fn.FoodName[0:strings.LastIndex(fn.FoodName, "")])] = 1
}
}
fmt.Println(foodNameList)
}
fmt.Println(result[19])
//t.Log(utils.Format4Output(result, false))
}

View File

@@ -20,10 +20,10 @@ func init() {
baseapi.Init(sugarLogger)
// 菜市
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_n49KrTnbe-Qatd-80sFOnQ")