huangjiajun 6 miesięcy temu
rodzic
commit
fdffd37610
1 zmienionych plików z 3 dodań i 3 usunięć
  1. +3
    -3
      app/admin/svc/order/svc_order_list.go

+ 3
- 3
app/admin/svc/order/svc_order_list.go Wyświetl plik

@@ -216,7 +216,7 @@ func JudgePackageOrdOrdState(ord *model.Order) *model.Order {
oldOrdState = ord.State
ordState = oldOrdState
//全部订单
countAll, err := db.Db.Where("oid =?", ord.Oid).Count(&model.OrderGoods{})
countAll, err := db.Db.Where("oid =? and goods_type=?", ord.Oid, 0).Count(&model.OrderGoods{})
if err != nil {
return ord
}
@@ -229,7 +229,7 @@ func JudgePackageOrdOrdState(ord *model.Order) *model.Order {
ordState = 1
}
//3、判断是否有 `烘焙中` 要全部制作完成
count2, err := db.Db.Where("oid =?", ord.Oid).And("state =?", 2).Count(&model.OrderGoods{})
count2, err := db.Db.Where("oid =?", ord.Oid).And("state =? and goods_type=0", 2).Count(&model.OrderGoods{})
if err != nil {
return ord
}
@@ -237,7 +237,7 @@ func JudgePackageOrdOrdState(ord *model.Order) *model.Order {
ordState = 2
}
//3、判断是否有 `分拣中` 要全部烘焙完成
count3, err := db.Db.Where("oid =?", ord.Oid).And("state =?", 3).Count(&model.OrderGoods{})
count3, err := db.Db.Where("oid =?", ord.Oid).And("state =? and goods_type=0", 3).Count(&model.OrderGoods{})
if err != nil {
return ord
}


Ładowanie…
Anuluj
Zapisz