1
This commit is contained in:
@@ -38,7 +38,6 @@ type OrderComment struct {
|
|||||||
// 根据门店id批量查询评价信息(新版)
|
// 根据门店id批量查询评价信息(新版)
|
||||||
// http://developer.waimai.meituan.com/home/docDetail/191
|
// 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) {
|
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{}{
|
params := map[string]interface{}{
|
||||||
KeyAppPoiCode: poiCode,
|
KeyAppPoiCode: poiCode,
|
||||||
"start_time": startDateStr,
|
"start_time": startDateStr,
|
||||||
@@ -61,14 +60,14 @@ func (a *API) CommentQuery(poiCode string, startDateStr, endDateStr string, offs
|
|||||||
}
|
}
|
||||||
params["pageoffset"] = offset
|
params["pageoffset"] = offset
|
||||||
params["pagesize"] = limit
|
params["pagesize"] = limit
|
||||||
result, err := nowApi.AccessAPI("comment/query", true, params)
|
result, err := a.AccessAPI("comment/query", true, params)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
break
|
||||||
}
|
}
|
||||||
var batchCommentList []*OrderComment
|
var batchCommentList []*OrderComment
|
||||||
err = utils.Map2StructByJson(result, &batchCommentList, false)
|
err = utils.Map2StructByJson(result, &batchCommentList, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
break
|
||||||
}
|
}
|
||||||
for _, comment := range batchCommentList {
|
for _, comment := range batchCommentList {
|
||||||
if comment.CommentLables != "" {
|
if comment.CommentLables != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user