From fdffd376108fed449785a0644768dc31c6a9c406 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 24 May 2024 13:33:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/svc/order/svc_order_list.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/admin/svc/order/svc_order_list.go b/app/admin/svc/order/svc_order_list.go index 0062b20..d91f173 100644 --- a/app/admin/svc/order/svc_order_list.go +++ b/app/admin/svc/order/svc_order_list.go @@ -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 }