- fixed some price bug.
This commit is contained in:
@@ -181,7 +181,7 @@ func (c *OrderController) GetOrder(orderID string) (order *model.GoodsOrder, err
|
||||
SkuID: int(utils.Str2Int64WithDefault(utils.Interface2String(product["extendCode"]), 0)),
|
||||
VendorSkuID: utils.Int64ToStr(utils.MustInterface2Int64(product["skuId"])),
|
||||
SkuName: product["name"].(string),
|
||||
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["userPrice"])),
|
||||
SalePrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"])), // todo 这个其实不是用户实付价,但之前用的userPrice取出来是空,暂时先用到
|
||||
Weight: int(math.Round(utils.Interface2FloatWithDefault(product["weight"], 0.0))),
|
||||
}
|
||||
order.Skus = append(order.Skus, sku)
|
||||
|
||||
@@ -158,7 +158,7 @@ func (c *WaybillController) CreateWaybill(order *model.GoodsOrder) (err error) {
|
||||
ReceiverLat: jxutils.StandardCoordinate2Int(latFloat),
|
||||
GoodsValue: jxutils.IntPrice2Standard(order.SalePrice), // todo 超价处理
|
||||
GoodsWeight: float64(order.Weight) / 1000,
|
||||
ExpectedDeliveryTime: order.ExpectedDeliveredTime.Unix(),
|
||||
// ExpectedDeliveryTime: order.ExpectedDeliveredTime.Unix(),
|
||||
OrderType: mtpsapi.OrderTypeASAP,
|
||||
}
|
||||
if billParams.DeliveryID, err = c.getDeliveryID(order, db); err == nil {
|
||||
|
||||
@@ -169,6 +169,7 @@ func (c *OrderController) legacyWriteJxOrder(order *model.GoodsOrder, db orm.Orm
|
||||
JdStoreId: order.VendorStoreID,
|
||||
OrderTotalMoney: int(order.SalePrice),
|
||||
OrderDiscountMoney: int(order.SalePrice - order.ActualPayPrice),
|
||||
OrderBuyerPayableMoney: int(order.ActualPayPrice),
|
||||
// DeliveryPackageWeight: float64(order.Weight) / 1000,
|
||||
}
|
||||
if order.VendorID == model.VendorIDELM {
|
||||
|
||||
Reference in New Issue
Block a user