Browse Source

更新

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

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

@@ -216,7 +216,7 @@ func JudgePackageOrdOrdState(ord *model.Order) *model.Order {
oldOrdState = ord.State oldOrdState = ord.State
ordState = oldOrdState 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 { if err != nil {
return ord return ord
} }
@@ -229,7 +229,7 @@ func JudgePackageOrdOrdState(ord *model.Order) *model.Order {
ordState = 1 ordState = 1
} }
//3、判断是否有 `烘焙中` 要全部制作完成 //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 { if err != nil {
return ord return ord
} }
@@ -237,7 +237,7 @@ func JudgePackageOrdOrdState(ord *model.Order) *model.Order {
ordState = 2 ordState = 2
} }
//3、判断是否有 `分拣中` 要全部烘焙完成 //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 { if err != nil {
return ord return ord
} }


Loading…
Cancel
Save