- add Promotion CreateType
This commit is contained in:
@@ -295,9 +295,11 @@ func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync, isContinueW
|
||||
Status: model.PromotionStatusLocalCreated,
|
||||
BeginAt: params.BeginAt,
|
||||
EndAt: params.EndAt,
|
||||
CreateType: model.PromotionCreateTypeByJX,
|
||||
}
|
||||
if vendorPromotionID != "" {
|
||||
promotion.VendorPromotionID = vendorPromotionID
|
||||
promotion.CreateType = model.PromotionCreateTypeByVendor
|
||||
}
|
||||
dao.WrapAddIDCULDEntity(promotion, userName)
|
||||
// if promotion.Params, err = jxutils.SerializeData(params); err != nil {
|
||||
|
||||
@@ -12,6 +12,11 @@ const (
|
||||
PromotionStatusEnded = 4 // 已经超过活动时间,且被显示置为结束
|
||||
)
|
||||
|
||||
const (
|
||||
PromotionCreateTypeByJX = 0
|
||||
PromotionCreateTypeByVendor = 1
|
||||
)
|
||||
|
||||
var (
|
||||
PromotionStatusName map[int]string
|
||||
)
|
||||
@@ -24,6 +29,7 @@ type Promotion struct {
|
||||
Advertising string `orm:"size(255)" json:"advertising"`
|
||||
Type int `json:"type"`
|
||||
Status int `json:"status"`
|
||||
CreateType int8 `json:"createType"`
|
||||
VendorPromotionID string `orm:"size(64);column(vendor_promotion_id);index" json:"vendorPromotionID"`
|
||||
BeginAt time.Time `orm:"type(datetime);index" json:"beginAt"`
|
||||
EndAt time.Time `orm:"type(datetime);index" json:"endAt"`
|
||||
|
||||
Reference in New Issue
Block a user