|
|
@@ -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 ), '-' ), '</br>金额:',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 ), '-' ), '</br>金额:',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) { |
|
|
|