Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_server_welfare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
50d7d83f
authored
Sep 04, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加分页参数
parent
44c423c7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
8 deletions
app/Http/Controllers/IntegralBillsController.php
app/Http/Controllers/InvitesController.php
app/Http/Controllers/UserExchangesController.php
app/Http/Filters/CheckInFilter.php
storage/laravels.json
storage/laravels.pid
app/Http/Controllers/IntegralBillsController.php
View file @
50d7d83f
...
...
@@ -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
);
...
...
app/Http/Controllers/InvitesController.php
View file @
50d7d83f
...
...
@@ -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
);
...
...
app/Http/Controllers/UserExchangesController.php
View file @
50d7d83f
...
...
@@ -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
);
...
...
app/Http/Filters/CheckInFilter.php
View file @
50d7d83f
...
...
@@ -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
storage/laravels.json
View file @
50d7d83f
This diff is collapsed.
Click to expand it.
storage/laravels.pid
View file @
50d7d83f
6993
\ No newline at end of file
4194
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment