diff --git a/business/jxstore/promotion/jd_promotion.go b/business/jxstore/promotion/jd_promotion.go index cd54000ae..3ab99e97c 100644 --- a/business/jxstore/promotion/jd_promotion.go +++ b/business/jxstore/promotion/jd_promotion.go @@ -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 { diff --git a/business/model/promotion.go b/business/model/promotion.go index c83bdd0dc..79e5abd1b 100644 --- a/business/model/promotion.go +++ b/business/model/promotion.go @@ -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"`