- up
This commit is contained in:
@@ -352,7 +352,7 @@ func caculateOrderEarningPrice(order *model.GoodsOrder, storePayPercentage int)
|
||||
if skuEarningPrice == 0 {
|
||||
skuEarningPrice = jxutils.CaculateSkuEarningPrice(v.ShopPrice, v.SalePrice, storePayPercentage)
|
||||
}
|
||||
order.EarningPrice += skuEarningPrice
|
||||
order.EarningPrice += skuEarningPrice * int64(v.Count)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -298,10 +298,11 @@ func CreateJdPromotion(ctx *jxcontext.Context, vendorID int, isIDJd bool, isAsyn
|
||||
return "", err
|
||||
}
|
||||
if len(conflictPromotion) > 0 {
|
||||
return "", fmt.Errorf("有冲突配置:%s", utils.Format4Output(conflictPromotion, true))
|
||||
return "", fmt.Errorf("有冲突配置:%s", utils.Format4Output(conflictPromotion, false))
|
||||
}
|
||||
}
|
||||
if vendorPromotionID == "" && vendorID == model.VendorIDJD {
|
||||
if vendorPromotionID == "" {
|
||||
if vendorID == model.VendorIDJD {
|
||||
sql := `
|
||||
SELECT t1.*, t2.jd_id, t3.vendor_store_id
|
||||
FROM store_sku_bind t1
|
||||
@@ -372,6 +373,7 @@ func CreateJdPromotion(ctx *jxcontext.Context, vendorID int, isIDJd bool, isAsyn
|
||||
if len(promotionPrices) == 0 {
|
||||
return "", ErrEmptySkus
|
||||
}
|
||||
}
|
||||
} else {
|
||||
promotion.VendorPromotionID = vendorPromotionID
|
||||
promotion.CreateType = model.PromotionCreateTypeByVendor
|
||||
@@ -665,7 +667,7 @@ func CancelJdPromotion(ctx *jxcontext.Context, promotionID int) (err error) {
|
||||
if err = dao.GetEntity(db, promotion); err != nil {
|
||||
return err
|
||||
}
|
||||
if promotion.Status != model.PromotionStatusCanceled {
|
||||
if promotion.Status == model.PromotionStatusCanceled {
|
||||
return errors.New("当前状态已经是取消")
|
||||
}
|
||||
if promotion.Status == model.PromotionStatusRemoteCreated {
|
||||
|
||||
Reference in New Issue
Block a user