瀏覽代碼

更新

master
huangjiajun 6 月之前
父節點
當前提交
fdffd37610
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      app/admin/svc/order/svc_order_list.go

+ 3
- 3
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
}


Loading…
取消
儲存