diff --git a/application/admin/service/PaymentOrderDao.php b/application/admin/service/PaymentOrderDao.php index 7064d2e..50785e5 100644 --- a/application/admin/service/PaymentOrderDao.php +++ b/application/admin/service/PaymentOrderDao.php @@ -134,14 +134,15 @@ class PaymentOrderDao ->where($where)->count(); $list = $receiptOrder ->alias("a") - ->join('hbp_order_hotel b', 'a.id = b.payment_order_id', 'left') - ->join('hbp_order_item c', 'a.id = c.payment_order_id', 'left') - ->field("a.*,ifnull(GROUP_CONCAT(b.id ORDER BY b.id DESC),'-') hotel_ids,ifnull(sum(b.total_price),'-') hotel_amount, - ifnull(GROUP_CONCAT(c.id ORDER BY c.id DESC),'-') item_ids,ifnull(sum(c.total_price),'-') item_amount") + ->field("a.*, + (SELECT concat('订单:',ifnull( GROUP_CONCAT( id ORDER BY id DESC ), '-' ), '
金额:',ifnull( sum( total_price ), '-' )) from hbp_order_item where payment_order_id = a.id) 'item', + (SELECT concat('订单:',ifnull( GROUP_CONCAT( id ORDER BY id DESC ), '-' ), '
金额:',ifnull( sum( total_price ), '-' )) from hbp_order_hotel where payment_order_id = a.id) 'hotel' + ") ->group("a.id") ->where($where) ->limit($offset, $param['pageSize']) ->order("a.id","DESC")->select(); + $data = ["total" => $total, "list" => $list->toArray()]; return Util::returnArrSu("", $data); } catch (Exception $e) { diff --git a/application/admin/view/payment_order/index.html b/application/admin/view/payment_order/index.html index 63b44ec..2c94c30 100755 --- a/application/admin/view/payment_order/index.html +++ b/application/admin/view/payment_order/index.html @@ -38,16 +38,14 @@ - + - +