|
@@ -347,8 +347,8 @@ class UserBillController
|
|
|
['page', 0], ['limit', 0], ['pm', 1]
|
|
|
], $request, true);
|
|
|
$list = UserBill::userBillList($request->uid(), $page, $limit, 'integral', $pm);
|
|
|
- $income = UserBill::where('category', 'integral')->where('pm', 1)->where('status', 1)->sum('number');
|
|
|
- $expend = UserBill::where('category', 'integral')->where('pm', 0)->where('status', 1)->sum('number');
|
|
|
+ $income = UserBill::where('uid', $request->uid())->where('category', 'integral')->where('pm', 1)->where('status', 1)->sum('number');
|
|
|
+ $expend = UserBill::where('uid', $request->uid())->where('category', 'integral')->where('pm', 0)->where('status', 1)->sum('number');
|
|
|
return app('json')->success('ok', compact('list', 'income', 'expend'));
|
|
|
|
|
|
}
|
|
@@ -359,8 +359,8 @@ class UserBillController
|
|
|
['page', 0], ['limit', 0], ['pm', 1]
|
|
|
], $request, true);
|
|
|
$list = UserBill::userBillList($request->uid(), $page, $limit, 'cash', $pm);
|
|
|
- $income = UserBill::where('category', 'cash')->where('pm', 1)->where('status', 1)->sum('number');
|
|
|
- $expend = UserBill::where('category', 'cash')->where('pm', 0)->where('status', 1)->sum('number');
|
|
|
+ $income = UserBill::where('uid', $request->uid())->where('category', 'cash')->where('pm', 1)->where('status', 1)->sum('number');
|
|
|
+ $expend = UserBill::where('uid', $request->uid())->where('category', 'cash')->where('pm', 0)->where('status', 1)->sum('number');
|
|
|
return app('json')->success('ok', compact('list', 'income', 'expend'));
|
|
|
}
|
|
|
}
|