From ac880a438770f33a5482721983320dc99f22eeac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 22 Jan 2021 11:17:32 +0800 Subject: [PATCH] aa --- business/jxstore/act/act.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 }