- format promotion to 活动
This commit is contained in:
@@ -254,7 +254,7 @@ func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync, isContinueW
|
||||
promotionSkuPrice.Price = skuBind.Price * promotionSkuPrice.Price / 100
|
||||
}
|
||||
if promotionSkuPrice.Price >= skuBind.Price {
|
||||
errMsg += fmt.Sprintf("促销价大于等于原价,storeID:%d, skuID:%d\n", skuBind.StoreID, skuBind.SkuID)
|
||||
errMsg += fmt.Sprintf("活动价大于等于原价,storeID:%d, skuID:%d\n", skuBind.StoreID, skuBind.SkuID)
|
||||
}
|
||||
if promotionSkuPrice.LimitSkuCount <= 0 {
|
||||
promotionSkuPrice.LimitSkuCount = DefaultLimitSkuCount
|
||||
@@ -343,7 +343,7 @@ func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync, isContinueW
|
||||
if vendorPromotionID == "" {
|
||||
promotionHandler := getPromotionHander(params.Type)
|
||||
if promotionHandler == nil {
|
||||
return "", errors.New("非法的促销类型")
|
||||
return "", errors.New("非法的活动类型")
|
||||
}
|
||||
infoId, err2 := promotionHandler.CreatePromotionInfos(params.Name, params.BeginAt, params.EndAt, utils.Int2Str(promotion.ID), params.Advertising)
|
||||
if err = err2; err != nil {
|
||||
@@ -621,7 +621,7 @@ func CancelJdPromotion(ctx *jxcontext.Context, promotionID int) (err error) {
|
||||
}
|
||||
promotionHandler := getPromotionHander(promotion.Type)
|
||||
if promotionHandler == nil {
|
||||
return errors.New("非法的促销类型")
|
||||
return errors.New("非法的活动类型")
|
||||
}
|
||||
if err = promotionHandler.CancelPromotion(utils.Str2Int64(promotion.VendorPromotionID), ""); err == nil {
|
||||
if _, err = dao.UpdateEntityLogically(db, promotion, map[string]interface{}{
|
||||
|
||||
@@ -45,10 +45,10 @@ type GoodsOrder struct {
|
||||
ModelTimeInfo `json:"-"`
|
||||
OriginalData string `orm:"type(text)" json:"-"`
|
||||
Skus []*OrderSku `orm:"-" json:"-"`
|
||||
SkuPmFee int64 `json:"-"` //门店商品促销总支出
|
||||
OrderPmFee int64 `json:"-"` //门店订单促销支出
|
||||
SkuPmSubsidy int64 `json:"-"` //平台商品促销总补贴
|
||||
OrderPmSubsidy int64 `json:"-"` //平台订单促销补贴
|
||||
SkuPmFee int64 `json:"-"` //门店商品活动总支出
|
||||
OrderPmFee int64 `json:"-"` //门店订单活动支出
|
||||
SkuPmSubsidy int64 `json:"-"` //平台商品活动总补贴
|
||||
OrderPmSubsidy int64 `json:"-"` //平台订单活动补贴
|
||||
BoxFee int64 `json:"-"` //餐盒费
|
||||
PlatformFeeRate int16 `json:"-"` //平台费
|
||||
BillStoreFreightFee int64 `json:"-"` //需要回调,门店所承担的运费
|
||||
@@ -78,7 +78,7 @@ type OrderSku struct {
|
||||
PromotionType int `json:"-"` // todo 当前是用于记录京东的PromotionType(生成jxorder用),没有做转换
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"-"` // 分区考虑
|
||||
SkuPmSubsidy int64 `json:"-"` //平台商品活动补贴
|
||||
SkuPmFee int64 `json:"-"` //门店商品促销支出
|
||||
SkuPmFee int64 `json:"-"` //门店商品活动支出
|
||||
}
|
||||
|
||||
// 同样商品在一个订单中可能重复出现(比如搞活动时,相同商品价格不一样,第一个有优惠)
|
||||
|
||||
Reference in New Issue
Block a user