aa
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1933,6 +1933,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user