作者 tangxuhui

调整数值计算

@@ -30,7 +30,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD @@ -30,7 +30,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
30 OrderGoodPrice: v.OrderGoodPrice, 30 OrderGoodPrice: v.OrderGoodPrice,
31 OrderGoodQuantity: v.OrderGoodQuantity, 31 OrderGoodQuantity: v.OrderGoodQuantity,
32 } 32 }
33 - orderGoodAmount := v.OrderGoodPrice * float64(v.OrderGoodQuantity) 33 + orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
34 good.OrderGoodAmount = orderGoodAmount 34 good.OrderGoodAmount = orderGoodAmount
35 orderGoods = append(orderGoods, good) 35 orderGoods = append(orderGoods, good)
36 } 36 }
@@ -120,7 +120,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD @@ -120,7 +120,7 @@ func (dividendsOrderService *DividendsOrderService) UpdateDividendsOrder(updateD
120 OrderGoodPrice: v.OrderGoodPrice, 120 OrderGoodPrice: v.OrderGoodPrice,
121 OrderGoodQuantity: v.OrderGoodQuantity, 121 OrderGoodQuantity: v.OrderGoodQuantity,
122 } 122 }
123 - orderGoodAmount := v.OrderGoodPrice * float64(v.OrderGoodQuantity) 123 + orderGoodAmount := v.OrderGoodPrice*float64(v.OrderGoodQuantity) - v.OrderGoodExpense
124 good.OrderGoodAmount = orderGoodAmount 124 good.OrderGoodAmount = orderGoodAmount
125 orderGoods = append(orderGoods, good) 125 orderGoods = append(orderGoods, good)
126 } 126 }