diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index dee857244..00a61d51b 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1587,10 +1587,10 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { // fmt.Println("deleteList2", deleteList) db := dao.GetDB() storeIDs := []int{667402, 666913, 666864, 666858, 666854, 666853, 666850, 666844} - var actStoreSkuParam []*act.ActStoreSkuParam for _, storeID := range storeIDs { acts, _ := dao.QueryActs(db, 0, 0, 50, -1, "", -1, []int{1}, []int{0, 3, 4}, nil, storeID, nil, 0, utils.ZeroTimeValue, utils.ZeroTimeValue, utils.Str2Time("2020-05-30 00:00:00"), utils.Str2Time("2020-07-30 00:00:00")) for _, v := range acts.Data { + var actStoreSkuParam []*act.ActStoreSkuParam _, actStoreSkus, _ := dao.GetActStoreSkuVendorList(db, v.ID, nil, nil, nil, "", 0, 99999) for _, actStoreSku := range actStoreSkus { if actStoreSku.StoreID == storeID { @@ -1604,10 +1604,12 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { actStoreSkuParam = append(actStoreSkuParam, aa) } } + _, err = act.DeleteActStoreSkuBind(ctx, db, v.ID, actStoreSkuParam) + if err == nil { + _, err = act.SyncAct(ctx, nil, v.ID, nil, true) + } } } - fmt.Println("actStoreSkuParam", utils.Format4Output(actStoreSkuParam, false)) - // act.DeleteActStoreSkuBind(ctx, db, v.ID, actStoreSkuParam) return err }