作者 tangxuhui

调整数值计算

... ... @@ -30,7 +30,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
OrderGoodPrice: v.OrderGoodPrice,
OrderGoodQuantity: v.OrderGoodQuantity,
}
orderGoodAmount := v.OrderGoodPrice * float64(v.OrderGoodQuantity)
orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
good.OrderGoodAmount = orderGoodAmount
orderGoods = append(orderGoods, good)
}
... ... @@ -120,7 +120,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
OrderGoodPrice: v.OrderGoodPrice,
OrderGoodQuantity: v.OrderGoodQuantity,
}
orderGoodAmount := v.OrderGoodPrice * float64(v.OrderGoodQuantity)
orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
good.OrderGoodAmount = orderGoodAmount
orderGoods = append(orderGoods, good)
}
... ...