This commit is contained in:
邹宗楠
2024-08-06 09:18:45 +08:00
parent 9e2462da8f
commit bccea89fc1

View File

@@ -49,7 +49,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
// return err
//}
startTime := time.Now().Add(-24 * time.Hour)
endTime := time.Now().Add(-RefreshCommentTime)
//endTime := time.Now().Add(-RefreshCommentTime)
endDateStr := startTime.Format("20060102")
startDateStr := time.Now().Add(-RefreshCommentTime).Format("20060102")
storeIDs, _ := dao.GetOrderStoreIDs(dao.GetDB(), fromTime, toTime, model.VendorIDMTWM)
@@ -244,12 +244,8 @@ func CommentListData(db *dao.DaoDB, skuList []*mtwmapi.CommentsList, startTime,
}
}
store, err := dao.GetStoreDetailByVendorStoreID(db, orderComment.VendorStoreID, orderComment.VendorID, "")
if err != nil {
globals.SugarLogger.Debugf("获取美团外卖差评列表,失败:%s,%v", orderComment.VendorStoreID, err)
continue
}
if err == nil {
orderComment.StoreID = store.ID
if len(foodNameList) > 0 {
foodName := make([]string, 0, len(foodNameList))
for fnl, _ := range foodNameList {
@@ -261,6 +257,12 @@ func CommentListData(db *dao.DaoDB, skuList []*mtwmapi.CommentsList, startTime,
}
}
orderCommentList = append(orderCommentList, orderComment)
} else {
orderComment.StoreID = 999999
orderComment.VendorOrderID2 = "本地未绑定平台门店ID"
orderCommentList = append(orderCommentList, orderComment)
globals.SugarLogger.Debugf("获取美团外卖差评列表,失败:%s,%v", orderComment.VendorStoreID, err)
}
}
return orderCommentList