活动创建平台添加京西
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)
|
||||
@@ -339,6 +340,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