diff --git a/application/admin/dao/PaymentOrderDao.php b/application/admin/dao/PaymentOrderDao.php index 3d96663..6bc6dbe 100644 --- a/application/admin/dao/PaymentOrderDao.php +++ b/application/admin/dao/PaymentOrderDao.php @@ -119,17 +119,29 @@ class PaymentOrderDao { try { $where = ["a.del_flag"=>0,"a.group_id"=>$param['group_id']]; - if (!empty($param['order_id'])) { + if (!empty($param['order_id']) || !empty($param['sub_order_id'])) { + $subWhere = []; + if (!empty($param['order_id'])) { + $subWhere["order_id"]=$param['order_id']; + } + if (!empty($param['sub_order_id'])) { + $subWhere["id"]=$param['sub_order_id']; + } $idList = []; $orderItemModel = new OrderItem(); - $orderItem = $orderItemModel->where(["id"=>$param['order_id']])->find(); - if ($orderItem != null && !empty($orderItem['payment_order_id'])) { - $idList[] = $orderItem['payment_order_id']; + $orderItemList = $orderItemModel->where($subWhere)->select()->toArray(); + foreach ($orderItemList as $orderItem) { + if ($orderItem != null && !empty($orderItem['payment_order_id'])) { + $idList[] = $orderItem['payment_order_id']; + } } + $orderHotelModel = new OrderHotel(); - $orderHotel = $orderHotelModel->where(["id"=>$param['order_id']])->find(); - if ($orderHotel != null && !empty($orderHotel['payment_order_id'])) { - $idList[] = $orderHotel['payment_order_id']; + $orderHotelList = $orderHotelModel->where($subWhere)->select()->toArray(); + foreach ($orderHotelList as $orderHotel) { + if ($orderHotel != null && !empty($orderHotel['payment_order_id'])) { + $idList[] = $orderHotel['payment_order_id']; + } } if (count($idList) == 0) { $where["a.id"]=0; diff --git a/application/admin/view/payment_order/index.html b/application/admin/view/payment_order/index.html index d061833..80fbe10 100755 --- a/application/admin/view/payment_order/index.html +++ b/application/admin/view/payment_order/index.html @@ -33,8 +33,10 @@