This commit is contained in:
苏尹岚
2021-01-22 11:17:32 +08:00
parent 6d9a3d2313
commit ac880a4387

View File

@@ -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
}