京东订单
This commit is contained in:
@@ -159,17 +159,20 @@ func updateOrderBySettleMent(order *model.GoodsOrder, orderSettlement *jdapi.Ord
|
||||
order.TotalShopMoney = orderSettlement.SettlementAmount
|
||||
order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney
|
||||
if order.TotalShopMoney > 0 {
|
||||
stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "")
|
||||
stores, _ := dao.GetStoreList(dao.GetDB(), []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, nil, nil, "")
|
||||
if len(stores) > 0 {
|
||||
if stores[0].PayPercentage <= 50 {
|
||||
order.NewEarningPrice = order.TotalShopMoney * int64((100 - stores[0].PayPercentage/2)) / 100
|
||||
order.NewEarningPrice = orderSettlement.SettlementAmount * int64((100 - stores[0].PayPercentage/2)) / 100
|
||||
} else {
|
||||
order.NewEarningPrice = order.EarningPrice
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Warnf("updateOrderBySettleMent,%v,%v,%v", order.VendorOrderID, orderSettlement.SettlementAmount)
|
||||
}
|
||||
} else {
|
||||
order.NewEarningPrice = order.EarningPrice
|
||||
}
|
||||
globals.SugarLogger.Debugf("updateOrderBySettleMent,%v,%v,%v", order.VendorOrderID, order.NewEarningPrice, jxutils.GetSaleStoreIDFromOrder(order))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -659,7 +659,7 @@ func buildCreateWareParam(storeSku *dao.StoreSkuSyncInfo) (createSkuParamWare *j
|
||||
}
|
||||
attrBzq := &jdshopapi.CreateSkuParamAttrs{
|
||||
AttrID: utils.Int2Str(attrIDs["保质期"]),
|
||||
AttrValues: []string{"5"},
|
||||
AttrValues: []string{"5天"},
|
||||
}
|
||||
attrsProp = append(attrsProp, attrZctj)
|
||||
attrsProp = append(attrsProp, attrJhl)
|
||||
|
||||
Reference in New Issue
Block a user