diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 083a28e13..5f94e826a 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -526,6 +526,19 @@ func PreCreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, actRu } func CreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, vendorOrgCode string, actRules []*ActOrderRuleParam, actStoreSku []*ActStoreSkuParam, isAsync bool) (hint string, err error) { + //权限 + if cms.IsRoled(ctx) { + if storeIDsMap, err := cms.GetUserStoresResultMap(ctx.GetUserID()); err == nil { + var actStoreSku2 []*ActStoreSkuParam + for _, v := range actStoreSku { + if storeIDsMap[v.StoreID] != 0 { + actStoreSku2 = append(actStoreSku2, v) + } + } + actStoreSku = nil + actStoreSku = actStoreSku2 + } + } if err = checkActValidation(act, vendorIDs); err != nil { return "", err }