From 7e471da34d1a785c5149f43eaa275f152e9da34a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 26 Feb 2024 17:22:29 +0800 Subject: [PATCH] 1 --- business/partner/purchase/mtwm/act.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/business/partner/purchase/mtwm/act.go b/business/partner/purchase/mtwm/act.go index 349999c6e..f16377699 100644 --- a/business/partner/purchase/mtwm/act.go +++ b/business/partner/purchase/mtwm/act.go @@ -233,20 +233,26 @@ func (c *PurchaseHandler) SyncAct(ctx *jxcontext.Context, parentTask tasksch.ITa } } } + globals.SugarLogger.Debugf("=========actStoreSkuList4Create := %s", utils.Format4Output(actStoreSkuList4Create, false)) + err = func() (err error) { + globals.SugarLogger.Debugf("=========act := %s", utils.Format4Output(act, false)) if model.IsSyncStatusDelete(act.SyncStatus) { + globals.SugarLogger.Debugf("=========act := %s", "delete") canceledList, err2 := cancelSkuAct(ctx, nil, act, actStoreSkuList) updateItems = append(updateItems, partner.ActStoreSku2Update(ctx, canceledList, model.SyncFlagModifiedMask)...) if err = err2; err == nil { updateItems = append(updateItems, partner.Act2Update(ctx, act, model.SyncFlagModifiedMask)) } } else if model.IsSyncStatusNew(act.SyncStatus) { + globals.SugarLogger.Debugf("=========act := %s", "create") createdList, err2 := createSkuAct(ctx, nil, act, actStoreSkuList4Create) updateItems = append(updateItems, partner.ActStoreSku2Update(ctx, createdList, model.SyncFlagNewMask)...) if err = err2; err == nil { updateItems = append(updateItems, partner.Act2Update(ctx, act, model.SyncFlagNewMask)) } } else if model.IsSyncStatusUpdate(act.SyncStatus) { + globals.SugarLogger.Debugf("=========act := %s", "update") if len(actStoreSkuList4Create) > 0 { addedList, err2 := createSkuAct(ctx, nil, act, actStoreSkuList4Create) updateItems = append(updateItems, partner.ActStoreSku2Update(ctx, addedList, model.SyncFlagNewMask)...)