From c8ca946a9bdf44537fb79e63bb5e7d8c4628189a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 12 Oct 2023 17:35:49 +0800 Subject: [PATCH] 1 --- platformapi/mtwmapi/comment.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/platformapi/mtwmapi/comment.go b/platformapi/mtwmapi/comment.go index 08edf344..d534a57f 100644 --- a/platformapi/mtwmapi/comment.go +++ b/platformapi/mtwmapi/comment.go @@ -1,7 +1,6 @@ package mtwmapi import ( - "git.rosy.net.cn/jx-callback/globals" "math" "strings" @@ -39,6 +38,7 @@ type OrderComment struct { // 根据门店id批量查询评价信息(新版) // http://developer.waimai.meituan.com/home/docDetail/191 func (a *API) CommentQuery(poiCode string, startDateStr, endDateStr string, offset, limit int, replyStatus int) (commentList []*OrderComment, err error) { + nowApi := a // 使用该变量缓存当前API的token,由于使用地址,导致其他变量修改了当前变量的token数据较大时出现异常 params := map[string]interface{}{ KeyAppPoiCode: poiCode, "start_time": startDateStr, @@ -61,13 +61,7 @@ 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) - } + result, err := nowApi.AccessAPI("comment/query", true, params) if err != nil { return nil, err }