Commit 50d7d83f by 杨树贤

添加分页参数

parent 44c423c7
......@@ -25,8 +25,8 @@ class IntegralBillsController extends Controller
*/
public function index(Request $request, IntegralBill $integralBill, IntegralBillFilter $filter)
{
$page = $request->has('page') ? $request->page : self::DEFAULT_PAGE;
$pageSize = $request->has('page_size') ? $request->page_size : self::DEFAULT_PAGE_SIZE;
$page = $request->get('page') ? $request->page : self::DEFAULT_PAGE;
$pageSize = $request->get('page_size') ? $request->page_size : self::DEFAULT_PAGE_SIZE;
$res = $integralBill->getIntegralBillList($page, $pageSize, $filter);
return $this->Export(0, 'ok', $res);
......
......@@ -25,8 +25,8 @@ class InvitesController extends Controller
*/
public function index(Request $request, Invite $invite, InviteFilter $filter)
{
$page = $request->has('page') ? $request->page : self::DEFAULT_PAGE;
$pageSize = $request->has('page_size') ? $request->page_size : self::DEFAULT_PAGE_SIZE;
$page = $request->get('page') ? $request->page : self::DEFAULT_PAGE;
$pageSize = $request->get('page_size') ? $request->page_size : self::DEFAULT_PAGE_SIZE;
$invites = $invite->getInviteList($page, $pageSize, $filter);
......
......@@ -52,8 +52,8 @@ class UserExchangesController extends Controller
*/
public function index(Request $request, UserExchange $userExchange, UserExchangeFilter $filter)
{
$page = $request->has('page') ? $request->page : self::DEFAULT_PAGE;
$pageSize = $request->has('page_size') ? $request->page_size : self::DEFAULT_PAGE_SIZE;
$page = $request->get('page') ? $request->page : self::DEFAULT_PAGE;
$pageSize = $request->get('page_size') ? $request->page_size : self::DEFAULT_PAGE_SIZE;
$res = $userExchange->getUserExchangeList($page, $pageSize, $filter);
......
......@@ -10,4 +10,14 @@ class CheckInFilter extends QueryFilter
{
return $this->builder->where('user_id', $userId);
}
public function add_time($addTime = '')
{
$addTime = explode('~', urldecode($addTime));
foreach ($addTime as $key=>$value) {
$addTime[$key] = strtotime($value);
}
return $this->builder->whereBetween('add_time',$addTime);
}
}
\ No newline at end of file
6993
\ No newline at end of file
4194
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment