diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index 453d96738..6939709f0 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -40,6 +40,7 @@ func InitServiceInfo(version, buildDate, gitCommit string) { "orderStatus": model.OrderStatusName, "waybillStatus": model.WaybillStatusName, "bankName": model.BankName, + "promotionStatusName": model.PromotionStatusName, }, } Init() diff --git a/business/model/promotion.go b/business/model/promotion.go index 43dc731f4..c83bdd0dc 100644 --- a/business/model/promotion.go +++ b/business/model/promotion.go @@ -12,6 +12,10 @@ const ( PromotionStatusEnded = 4 // 已经超过活动时间,且被显示置为结束 ) +var ( + PromotionStatusName map[int]string +) + type Promotion struct { ModelIDCULD @@ -25,6 +29,16 @@ type Promotion struct { EndAt time.Time `orm:"type(datetime);index" json:"endAt"` } +func init() { + PromotionStatusName = map[int]string{ + PromotionStatusLocalCreated: "创建中", + PromotionStatusRemoteFailed: "失败", + PromotionStatusRemoteCreated: "正常", + PromotionStatusCanceled: "取消", + PromotionStatusEnded: "结束", + } +} + func (*Promotion) TableUnique() [][]string { return [][]string{ []string{"Name", "VendorID", "Type", "DeletedAt"},