From 7065dc8cd4e5f381bb01e7bf4d82d80ca74cc084 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Tue, 8 Jun 2021 10:30:09 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store_sku.go | 11 ++++++++++- business/jxstore/tempop/tempop.go | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 82fb91332..8c3c775a8 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -5340,13 +5340,22 @@ func StoreSkuPriceAudit(ctx *jxcontext.Context, storeSkuAudits []*model.StoreSku func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { storeAudit := batchItemList[0].(*model.StoreSkuAudit) if multiFlag { + var skuIDList []int skuList, _ := dao.GetStoreSkusByNameIDs(db, []int{storeAudit.StoreID}, storeAudit.NameID) if len(skuList) > 0 { if int64(storeAudit.AuditPrice) > skuList[0].UnitPrice*2 { return nil, fmt.Errorf("修改的价格超出原价格两倍,请单个审核!门店ID:[%v],商品nameID:[%v],商品名:[%v]", storeAudit.StoreID, storeAudit.NameID, skuList[0].Name) } + for _, v := range skuList { + skuIDList = append(skuIDList, v.SkuID) + } + } + actList, _ := dao.QueryActs(db, 0, 0, 10, -1, "", -1, []int{model.ActStatusCreated}, + []int{model.ActSkuDirectDown, model.ActSkuSecKill, model.ActSkuDiscount}, nil, storeAudit.StoreID, skuIDList, 0, + time.Now().AddDate(0, -3, 0), time.Now(), utils.ZeroTimeValue, utils.ZeroTimeValue) + if len(actList.Data) > 0 { + return nil, fmt.Errorf("审核的商品正在做活动,请单个审核!活动ID:[%v],门店ID:[%v],商品nameID:[%v],商品名:[%v]", actList.Data[0].ID, storeAudit.StoreID, storeAudit.NameID, skuList[0].Name) } - //dao.QueryActs(db, 0, 0, 10, -1, "", -1, []int{model.ActStatusCreated}, []int{model.ActSkuDirectDown, model.ActSkuSecKill, model.ActSkuDiscount}) } storeAudits, err := dao.GetStoreSkuAuditLight(db, []int{storeAudit.StoreID}, []int{storeAudit.NameID}, model.StoreAuditStatusOnline) if len(storeAudits) == 0 || err != nil { diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index fd97a709e..f28e3262d 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -1933,6 +1933,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) { } } } + return err }