jds创建售后单?

This commit is contained in:
苏尹岚
2020-09-04 09:05:17 +08:00
parent 5838ef1eb7
commit 2d64057911

View File

@@ -6,6 +6,8 @@ import (
"math"
"time"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
@@ -19,6 +21,7 @@ func (c *PurchaseHandler) AgreeOrRefuseRefund(ctx *jxcontext.Context, afsOrder *
status = model.AfsOrderStatusFailed
} else {
status = model.AfsOrderStatusFinished
}
orderStatus := &model.OrderStatus{
VendorOrderID: afsOrder.AfsOrderID, // 是售后单ID不是订单ID订单ID在RefVendorOrderID中
@@ -63,7 +66,7 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G
AfsOrderID: orderStatus.VendorOrderID,
VendorOrderID: orderStatus.RefVendorOrderID,
VendorStoreID: order.VendorStoreID,
StoreID: order.StoreID,
StoreID: jxutils.GetSaleStoreIDFromOrder(order),
AfsCreatedAt: time.Now(),
VendorAppealType: "",
AppealType: model.AfsAppealTypeRefund,
@@ -89,6 +92,7 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G
afsOrder.SkuUserMoney += orderSku.UserMoney
afsOrder.Skus = append(afsOrder.Skus, orderSku)
}
err = partner.CurOrderManager.OnAfsOrderNew(afsOrder, orderStatus)
return err
}