This commit is contained in:
suyl
2021-08-19 11:29:57 +08:00
parent 64156d15e3
commit c957139040

View File

@@ -51,7 +51,7 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
for _, v := range storeIDs {
if commentList, err := api.EbaiAPI.OrderCommetGet(utils.Int2Str(v), 0, fromTime, toTime, 0); err == nil {
for _, comment := range commentList {
if comment.OrderID != 0 && comment.AnonymousRating == "0" && comment.CanReply == "1" {
if comment.CanReply == "1" {
orderComment := &model.OrderComment{
VendorOrderID: utils.Int64ToStr(comment.OrderID),
VendorID: model.VendorIDEBAI,
@@ -64,6 +64,9 @@ func (c *PurchaseHandler) RefreshComment(fromTime, toTime time.Time) (err error)
ModifyDuration: EBAI_BAD_COMMENTS_MAX_MODIFY_TIME,
OriginalMsg: string(utils.MustMarshal(comment)),
}
if orderComment.VendorOrderID == "" {
orderComment.VendorOrderID = orderComment.UserCommentID
}
// 直接得到的订单是饿了么的,尝试统一成饿百
if order, err := partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, model.VendorIDEBAI); err == nil {
orderComment.VendorOrderID = order.VendorOrderID