+ globals.EnableNewAct

This commit is contained in:
gazebo
2019-07-15 14:19:38 +08:00
parent 82ad1ed0cc
commit 598a9738e8
4 changed files with 21 additions and 2 deletions

View File

@@ -1,7 +1,11 @@
package controllers
import (
"fmt"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/globals"
"github.com/astaxie/beego"
@@ -36,6 +40,11 @@ type PromotionController struct {
// @router /CreatePromotion [post]
func (c *PromotionController) CreatePromotion() {
c.callCreatePromotion(func(params *tPromotionCreatePromotionParams) (retVal interface{}, errCode string, err error) {
if globals.EnableNewAct {
if params.VendorID == model.VendorIDJD {
return retVal, "", fmt.Errorf("请使用新版活动管理创建平台活动")
}
}
beginAt, err := utils.TryStr2Time(params.BeginAt)
if err != nil {
return retVal, "", err