- promotion/CreatePromotion支持创建京西与京东活动

This commit is contained in:
gazebo
2019-06-19 13:52:13 +08:00
parent 90b29132c0
commit 840406aad4
2 changed files with 3 additions and 9 deletions

View File

@@ -1,15 +1,12 @@
package controllers
import (
"errors"
"git.rosy.net.cn/jx-callback/business/jxutils"
"github.com/astaxie/beego"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/promotion"
"git.rosy.net.cn/jx-callback/business/model"
)
type PromotionController struct {
@@ -39,9 +36,6 @@ type PromotionController struct {
// @router /CreatePromotion [post]
func (c *PromotionController) CreatePromotion() {
c.callCreatePromotion(func(params *tPromotionCreatePromotionParams) (retVal interface{}, errCode string, err error) {
if params.VendorID != model.VendorIDJD {
return nil, "", errors.New("当前只支持创建京东活动")
}
beginAt, err := utils.TryStr2Time(params.BeginAt)
if err != nil {
return retVal, "", err