Browse Source

1.下单规则更新

master
huangjiajun 6 months ago
parent
commit
ce09d58a92
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/admin/svc/order/svc_order_list.go

+ 1
- 1
app/admin/svc/order/svc_order_list.go View File

@@ -768,7 +768,7 @@ func OrderEditNum(c *gin.Context) {
if utils.StrToFloat64(args["price"]) > 0 && utils.StrToFloat64(args["price"]) != utils.StrToFloat64(orderGoods.Price) { if utils.StrToFloat64(args["price"]) > 0 && utils.StrToFloat64(args["price"]) != utils.StrToFloat64(orderGoods.Price) {
order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) - float64(orderGoods.Num)*utils.StrToFloat64(orderGoods.Price)) order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) - float64(orderGoods.Num)*utils.StrToFloat64(orderGoods.Price))
orderGoods.Price = args["price"] orderGoods.Price = args["price"]
order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) + float64(num)*utils.StrToFloat64(orderGoods.Price))
order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) + float64(utils.StrToInt(args["num"]))*utils.StrToFloat64(orderGoods.Price))
} else { } else {
order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) + float64(num)*utils.StrToFloat64(orderGoods.Price)) order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) + float64(num)*utils.StrToFloat64(orderGoods.Price))
} }


Loading…
Cancel
Save