Browse Source

更新

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

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

@@ -802,11 +802,19 @@ func OrderUpdateState(c *gin.Context) {
for _, v1 := range flow { for _, v1 := range flow {
v1.SuccessNum += v.Num v1.SuccessNum += v.Num
v1.WaitSortingNum -= v.Num v1.WaitSortingNum -= v.Num
v1.WaitBakingNum -= v.Num
v1.WaitMakeNum -= v.Num
if v1.WaitSortingNum < 0 { if v1.WaitSortingNum < 0 {
v1.WaitSortingNum = 0 v1.WaitSortingNum = 0
} }
if v1.WaitMakeNum < 0 {
v1.WaitMakeNum = 0
}
if v1.WaitBakingNum < 0 {
v1.WaitBakingNum = 0
}
sess5 := sess sess5 := sess
_, err = sess5.Where("id=?", v1.Id).Cols("success_num,wait_sorting_num").Update(&v1)
_, err = sess5.Where("id=?", v1.Id).AllCols().Update(&v1)
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