- GoodsOrder添加PmSubsidyMoney
This commit is contained in:
@@ -21,6 +21,7 @@ type GoodsOrder struct {
|
||||
SalePrice int64 `json:"salePrice"` // 售卖价
|
||||
ActualPayPrice int64 `json:"actualPayPrice"` // 单位为分 顾客实际支付
|
||||
TotalShopMoney int64 `json:"shopMoney"` // 应结金额-第三方平台结算给京西的金额(包括了所有的补贴,扣除)
|
||||
PmSubsidyMoney int64 `json:"pmSubsidyMoney"` // 平台活动补贴(订单主体活动补贴+订单单条sku补贴)1+
|
||||
Weight int `json:"weight"` // 单位为克
|
||||
ConsigneeName string `orm:"size(32)" json:"consigneeName"`
|
||||
ConsigneeMobile string `orm:"size(32)" json:"consigneeMobile"`
|
||||
|
||||
@@ -215,7 +215,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
}
|
||||
var baiduRate int64
|
||||
sku.SalePrice, baiduRate, sku.StoreSubName = getSkuSalePrice(product)
|
||||
order.TotalShopMoney += baiduRate
|
||||
order.PmSubsidyMoney += baiduRate
|
||||
if sku.Weight == 0 {
|
||||
sku.Weight = jxutils.FormatSkuWeight(specQuality, specUnit) // 订单信息里没有重量,只有名字里尝试找
|
||||
}
|
||||
|
||||
@@ -105,7 +105,8 @@ func (c *PurchaseHandler) getOrder(orderID string) (order *model.GoodsOrder, ord
|
||||
task.GetResult(0)
|
||||
if order != nil {
|
||||
if orderSettlement != nil {
|
||||
order.TotalShopMoney = orderSettlement.SettlementAmount + orderSettlement.PlatOrderGoodsDiscountMoney
|
||||
order.TotalShopMoney = orderSettlement.SettlementAmount
|
||||
order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney
|
||||
}
|
||||
}
|
||||
// if orderMap, err = api.JdAPI.QuerySingleOrder(orderID); err == nil {
|
||||
|
||||
@@ -208,7 +208,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
if poiReceiveDetail != nil {
|
||||
order.TotalShopMoney = poiReceiveDetail.WmPoiReceiveCent
|
||||
for _, v := range poiReceiveDetail.ActOrderChargeByMt {
|
||||
order.TotalShopMoney += v.MoneyCent
|
||||
order.PmSubsidyMoney += v.MoneyCent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user