统计优化
parent
fc9a52c9ee
commit
d9eb6a72e0
|
|
@ -253,10 +253,11 @@ class ReportController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = Order::select([
|
$query = Order::select([
|
||||||
DB::raw('sum(money) as money'),
|
DB::raw('sum(IF(type = 3, union_money, money)) as money'),
|
||||||
DB::raw('count(*) as count'),
|
DB::raw('count(*) as count'),
|
||||||
'lottery_type_id',
|
'lottery_type_id',
|
||||||
])
|
])
|
||||||
|
->usable()
|
||||||
->where('draft_shop_id', $this->shopId());
|
->where('draft_shop_id', $this->shopId());
|
||||||
|
|
||||||
if ($dateStart) {
|
if ($dateStart) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue