Merge remote-tracking branch 'origin/mark' into don
This commit is contained in:
@@ -74,6 +74,7 @@ func init() {
|
||||
|
||||
func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Act, vendorIDs []int, actStoreSku []*ActStoreSkuParam) (validVendorIDs []int, actStoreSkuList []*model.ActStoreSku, actStoreSkuMapList []*model.ActStoreSkuMap, err error) {
|
||||
wholeValidVendorMap := make(map[int]int)
|
||||
wholeValidVendorMap[model.VendorIDJX] = 1
|
||||
if len(actStoreSku) > 0 {
|
||||
storeIDMap := make(map[int]int)
|
||||
skuIDMap := make(map[int]int)
|
||||
@@ -161,6 +162,8 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac
|
||||
dao.WrapAddIDCULDEntity(actSkuMap, ctx.GetUserName())
|
||||
actStoreSkuMapList = append(actStoreSkuMapList, actSkuMap)
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("ActStoreSkuParam2Model storeID:%d, skuID:%d没有关注", v.StoreID, v.SkuID)
|
||||
}
|
||||
}
|
||||
wholeValidVendorMap[vendorID] = 1
|
||||
@@ -339,6 +342,10 @@ func PreCreateAct(ctx *jxcontext.Context, act *model.Act, vendorIDs []int, actRu
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(validVendorIDs) == 0 {
|
||||
dao.Rollback(db)
|
||||
return nil, fmt.Errorf("没有一个合法平台可以创建活动")
|
||||
}
|
||||
|
||||
preCreateActInfo = &tPreCreateActInfo{
|
||||
ValidVendorIDs: validVendorIDs,
|
||||
|
||||
Reference in New Issue
Block a user