diff --git a/business/jxcallback/scheduler/basesch/basesch_ext.go b/business/jxcallback/scheduler/basesch/basesch_ext.go index 4cc88ca45..3d403a364 100644 --- a/business/jxcallback/scheduler/basesch/basesch_ext.go +++ b/business/jxcallback/scheduler/basesch/basesch_ext.go @@ -6,6 +6,7 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils/errlist" + "git.rosy.net.cn/jx-callback/business/jxstore/cms" "git.rosy.net.cn/jx-callback/business/jxutils" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/jxutils/tasksch" @@ -128,6 +129,9 @@ func (c *BaseScheduler) AdjustOrder(ctx *jxcontext.Context, order *model.GoodsOr func (c *BaseScheduler) CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) (err error) { if c.IsReallyCallPlatformAPI { + if globals.IsAddEvent { + err = cms.AddEventDetail(dao.GetDB(), ctx, model.OperateUpdate, order.StoreID, model.ThingTypeOrder, order.StoreID, order.VendorOrderID, order.StoreName) + } err = partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID).CancelOrder(ctx, order, reason) } return err diff --git a/business/model/const.go b/business/model/const.go index 03ac5307f..bf657e366 100644 --- a/business/model/const.go +++ b/business/model/const.go @@ -139,6 +139,7 @@ var ( "RegisterUser": "注册", "AutoPayForPopluarMan": "每日订单打款", "SyncStoresQualify": "上传门店营业资质", + "CancelOrder": "取消订单", } MultiStoresVendorMap = map[int]int{ diff --git a/business/model/sync_map.go b/business/model/sync_map.go index 3d1ccf360..6fc3a7d09 100644 --- a/business/model/sync_map.go +++ b/business/model/sync_map.go @@ -6,6 +6,7 @@ const ( ThingTypeSku = 3 ThingTypeStore = 4 ThingTypeUser = 5 + ThingTypeOrder = 6 ) type ThingMap struct {