Browse Source

1.修改商品

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

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

@@ -304,8 +304,8 @@ func OrderCancel(c *gin.Context) {
e.OutErr(c, 400, e.NewErr(400, "订单已经在制作,取消失败")) e.OutErr(c, 400, e.NewErr(400, "订单已经在制作,取消失败"))
return return
} }
all.WaitBakingNum -= v.Num
_, err := sess.Where("id=?", all.Id).Cols("wait_baking_num").Update(all)
all.WaitMakeNum -= v.Num
_, err := sess.Where("id=?", all.Id).Cols("wait_make_num").Update(all)
if err != nil { if err != nil {
sess.Rollback() sess.Rollback()
e.OutErr(c, 400, e.NewErr(400, "订单取消失败")) e.OutErr(c, 400, e.NewErr(400, "订单取消失败"))
@@ -656,8 +656,8 @@ func OrderEditNum(c *gin.Context) {
e.OutErr(c, 400, e.NewErr(400, "订单已经在制作,取消失败")) e.OutErr(c, 400, e.NewErr(400, "订单已经在制作,取消失败"))
return return
} }
all.WaitBakingNum -= orderGoods.Num
_, err := sess.Where("id=?", all.Id).Cols("wait_baking_num").Update(all)
all.WaitMakeNum -= orderGoods.Num
_, err := sess.Where("id=?", all.Id).Cols("wait_make_num").Update(all)
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