update
This commit is contained in:
parent
65ec2c5dde
commit
e2fb325452
|
|
@ -307,11 +307,13 @@ func GetOrderDetail(orderId string) OrderDetail {
|
|||
Discount: float64(orderSub.Discount),
|
||||
Goods: goods,
|
||||
}
|
||||
if orderSub.OrderStatus == 1 {
|
||||
x := float64(orderSub.PayAmount) / 10
|
||||
orderSubR1.PayAmount = strconv.FormatFloat(x, 'f', 1, 64)
|
||||
}
|
||||
if orderSubR1.Discount < 100 {
|
||||
//orderSubR1.PayAmount = int32(math.Round(float64(orderSubR1.TotalAmount) * (orderSubR1.Discount / 100.0)))
|
||||
//x := float64(orderSubR1.TotalAmount) * (orderSubR1.Discount / 100.0) / 10
|
||||
x := float64(orderSub.PayAmount) / 10
|
||||
orderSubR1.PayAmount = strconv.FormatFloat(x, 'f', 1, 64)
|
||||
orderSubR1.DiscountAmount = orderSubR1.PayAmount
|
||||
} else {
|
||||
orderSubR1.DiscountAmount = strconv.Itoa(orderSubR1.TotalAmount)
|
||||
|
|
|
|||
Loading…
Reference in New Issue