- fix bug in OrderManager.OnOrderComments
This commit is contained in:
@@ -71,6 +71,17 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
||||
db := dao.GetDB()
|
||||
for _, orderComment := range orderCommentList {
|
||||
globals.SugarLogger.Debugf("OnOrderComments, orderID:%s", orderComment.VendorOrderID)
|
||||
var order *model.GoodsOrder
|
||||
if orderComment.VendorID == model.VendorIDEBAI {
|
||||
if realVendorID := jxutils.GetPossibleVendorIDFromVendorOrderID(orderComment.VendorOrderID); realVendorID == model.VendorIDELM {
|
||||
if order, err = partner.CurOrderManager.LoadOrder2(orderComment.VendorOrderID, model.VendorIDEBAI); err == nil {
|
||||
orderComment.VendorOrderID = order.VendorOrderID
|
||||
} else {
|
||||
globals.SugarLogger.Warnf("OnOrderComments, load orderID:%s failed", orderComment.VendorOrderID)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
comment2 := &legacymodel.JxBadComments2{
|
||||
OrderId: orderComment.VendorOrderID,
|
||||
}
|
||||
@@ -98,9 +109,10 @@ func (c *OrderManager) OnOrderComments(orderCommentList []*model.OrderComment) (
|
||||
comment2.LastPushTime = utils.Time2Str(time.Now())
|
||||
comment2.PushNo = 1
|
||||
comment2.Maxmodifytime = int(orderComment.ModifyDuration)
|
||||
|
||||
order, err2 := partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
||||
if err = err2; err == nil {
|
||||
if order == nil {
|
||||
order, err = partner.CurOrderManager.LoadOrder(orderComment.VendorOrderID, orderComment.VendorID)
|
||||
}
|
||||
if err == nil {
|
||||
orderComment.StoreID = jxutils.GetSaleStoreIDFromOrder(order)
|
||||
if orderComment.StoreID > 0 {
|
||||
comment2.Jxstoreid = utils.Int2Str(orderComment.StoreID)
|
||||
|
||||
Reference in New Issue
Block a user