Browse Source

1.下单规则更新

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

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

@@ -713,7 +713,7 @@ func OrderEditNum(c *gin.Context) {
order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) + utils.StrToFloat64(args["num"])*utils.StrToFloat64(orderGoodsSku.Price)) order.Amount = utils.Float64ToStr(utils.StrToFloat64(order.Amount) + utils.StrToFloat64(args["num"])*utils.StrToFloat64(orderGoodsSku.Price))
} }
orderGoodsSku.DeductMemo = args["memo"] orderGoodsSku.DeductMemo = args["memo"]
_, err = sess.Where("id=?", orderGoodsSku.Id).Cols("num,memo,old_num,price").Update(orderGoodsSku)
_, err = sess.Where("id=?", orderGoodsSku.Id).Cols("num,memo,deduct_memo,old_num,price").Update(orderGoodsSku)
if err != nil { if err != nil {
sess.Rollback() sess.Rollback()
e.OutErr(c, 400, e.NewErr(400, "修改失败")) e.OutErr(c, 400, e.NewErr(400, "修改失败"))
@@ -786,7 +786,7 @@ func OrderEditNum(c *gin.Context) {
orderGoods.OldNum = orderGoods.Num orderGoods.OldNum = orderGoods.Num
orderGoods.Num = utils.StrToInt(args["num"]) orderGoods.Num = utils.StrToInt(args["num"])
orderGoods.DeductMemo = args["memo"] orderGoods.DeductMemo = args["memo"]
_, err = sess.Where("id=?", orderGoods.Id).Cols("num,sku_code,sku_id,sku,memo,old_num,price").Update(orderGoods)
_, err = sess.Where("id=?", orderGoods.Id).Cols("num,sku_code,sku_id,sku,memo,deduct_memo,old_num,price").Update(orderGoods)
if err != nil { if err != nil {
sess.Rollback() sess.Rollback()
e.OutErr(c, 400, e.NewErr(400, "修改失败")) e.OutErr(c, 400, e.NewErr(400, "修改失败"))


Loading…
Cancel
Save