修改京东商城商品属性

This commit is contained in:
苏尹岚
2020-05-27 11:44:36 +08:00
parent edad47e3ac
commit cb18721483
3 changed files with 19 additions and 22 deletions

View File

@@ -137,9 +137,15 @@ func updateOrderBySettleMent(order *model.GoodsOrder, orderSettlement *jdapi.Ord
// order.WaybillTipMoney = orderSettlement.VenderPaidTips
order.TotalShopMoney = orderSettlement.SettlementAmount
order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney
stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "")
if len(stores) > 0 {
jxutils.RefreshOrderEarningPrice2(order, stores[0].PayPercentage)
if order.TotalShopMoney > 0 {
stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "")
if len(stores) > 0 {
if stores[0].PayPercentage <= 50 {
order.NewEarningPrice = order.TotalShopMoney * int64((100 - stores[0].PayPercentage/2)) / 100
} else {
order.NewEarningPrice = order.EarningPrice
}
}
}
}
}