diff --git a/application/admin/dao/OrderHotelDao.php b/application/admin/dao/OrderHotelDao.php index 60bd7e3..c61d5de 100644 --- a/application/admin/dao/OrderHotelDao.php +++ b/application/admin/dao/OrderHotelDao.php @@ -152,7 +152,7 @@ class OrderHotelDao public function setSubOrderAmount( int $subOrderId) { try{ $purchaseModel = new Purchase(); - $purchaseList = $purchaseModel->where(["order_detail_id"=>$subOrderId,"del_flag"=>0])->select()->toArray(); + $purchaseList = $purchaseModel->where(["order_detail_id"=>$subOrderId,"del_flag"=>0,"prod_type"=>"hotel"])->select()->toArray(); $cost = 0; $amount = 0; $count = 0; diff --git a/application/admin/dao/OrderItemDao.php b/application/admin/dao/OrderItemDao.php index 5c04063..15971fe 100644 --- a/application/admin/dao/OrderItemDao.php +++ b/application/admin/dao/OrderItemDao.php @@ -101,7 +101,7 @@ class OrderItemDao public function setSubOrderAmount( int $subOrderId) { try{ $purchaseModel = new Purchase(); - $purchaseList = $purchaseModel->where(["order_detail_id"=>$subOrderId,"del_flag"=>0])->select()->toArray(); + $purchaseList = $purchaseModel->where(["order_detail_id"=>$subOrderId,"del_flag"=>0,"prod_type"=>"item"])->select()->toArray(); $cost = 0; $amount = 0; $count = 0;