1
This commit is contained in:
@@ -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)...)
|
||||
|
||||
Reference in New Issue
Block a user