|
@@ -56,7 +56,6 @@ class Giftbaobilog extends Backend
|
|
|
$list = $this->model
|
|
|
->with(['user','gift'])
|
|
|
->where($where)
|
|
|
- ->where('baobi_total','>',0)
|
|
|
->order($sort, $order)
|
|
|
->paginate($limit);
|
|
|
|
|
@@ -66,7 +65,10 @@ class Giftbaobilog extends Backend
|
|
|
$row->getRelation('gift')->visible(['name']);
|
|
|
}
|
|
|
|
|
|
- $result = array("total" => $list->total(), "rows" => $list->items());
|
|
|
+ $pay_total_sum = $this->model->where($where)->order($sort, $order)->sum('pay_total');
|
|
|
+ $baobi_total_sum = $this->model->where($where)->order($sort, $order)->sum('baobi_total');
|
|
|
+
|
|
|
+ $result = array("total" => $list->total(), "rows" => $list->items(),"extend" => ['pay_total_sum'=>$pay_total_sum,'baobi_total_sum'=>$baobi_total_sum]);
|
|
|
|
|
|
return json($result);
|
|
|
}
|