- 美团与饿百的订单活动商品处理,饿百活动商品没有拆开,摊销处理
This commit is contained in:
@@ -50,6 +50,11 @@ var (
|
||||
fakeUserApplyCancel: model.OrderStatusApplyCancel,
|
||||
fakeUserUndoApplyCancel: model.OrderStatusUndoApplyCancel,
|
||||
}
|
||||
|
||||
skuActTypeMap = map[string]int{
|
||||
ebaiapi.OrderSkuDiscountTypeZhe: 1,
|
||||
ebaiapi.OrderSkuDiscountTypeReduce: 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (p *PurchaseHandler) GetStatusFromVendorStatus(vendorStatus string) int {
|
||||
@@ -233,8 +238,8 @@ func getSkuSalePrice2(product *ebaiapi.OrderProductInfo) (salePrice int) {
|
||||
salePrice = product.ProductPrice
|
||||
if product.ProductSubsidy != nil {
|
||||
for _, v := range product.ProductSubsidy.DiscountDetail {
|
||||
if v.Type == ebaiapi.OrderSkuDiscountTypeZhe {
|
||||
salePrice -= v.BaiduRate + v.ShopRate
|
||||
if skuActTypeMap[v.Type] == 1 {
|
||||
salePrice -= (v.BaiduRate + v.ShopRate) / product.Number // 饿百同一SKU的优惠与非优惠没有拆开,平均摊销处理
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user