Browse Source

接口优化

dev
nizongfeng 3 years ago
parent
commit
63c73f9793
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      application/admin/service/ReceiptOrderDao.php

+ 2
- 2
application/admin/service/ReceiptOrderDao.php View File

@@ -100,14 +100,14 @@ class ReceiptOrderDao
$total = $receiptOrder
->alias("a")
->join('hbp_order_main b', 'a.id = b.receipt_order_id', 'left')
->field("a.*,count(1) cnt,sum(b.total_amount) total_amount")
->field("a.*,GROUP_CONCAT(b.id) order_ids,sum(b.total_amount) total_amount")
->group("a.id")
->where($where)->count();

$list = $receiptOrder
->alias("a")
->join('hbp_order_main b', 'a.id = b.receipt_order_id', 'left')
->field("a.*,count(1) cnt,sum(b.total_amount) total_amount")
->field("a.*,GROUP_CONCAT(b.id) order_ids,sum(b.total_amount) total_amount")
->group("a.id")
->where($where)
->limit($offset, $param['pageSize'])


Loading…
Cancel
Save