Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
5bb7366c
Commit
5bb7366c
authored
Feb 18, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索时间限制
parent
43915eca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+11
-0
No files found.
application/api_broker/controller/HomePageLog.php
View file @
5bb7366c
...
...
@@ -72,6 +72,8 @@ class HomePageLog extends Basic
if
(
empty
(
$params
[
'start_time'
])
||
empty
(
$params
[
'end_time'
]))
{
return
$this
->
response
(
"101"
,
'请选择时间'
);
}
$start_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"start_time"
]);
$end_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"end_time"
]);
...
...
@@ -87,6 +89,10 @@ class HomePageLog extends Basic
$where
.=
" AND content LIKE '%
$search_content
%'"
;
}
if
(
!
empty
(
$params
[
"start_time"
])
&&
!
empty
(
$params
[
"end_time"
]))
{
$time
=
strtotime
(
$params
[
'end_time'
])
-
strtotime
(
$params
[
'start_time'
]);
if
(
$time
>
1296000
||
$time
<
0
)
{
return
$this
->
response
(
101
,
'搜索时间不能大于15天'
);
}
$where_
[
"create_time"
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
$where
.=
' AND create_time BETWEEN "'
.
$start_time
.
'" AND "'
.
$end_time
.
'"'
;
...
...
@@ -179,6 +185,7 @@ class HomePageLog extends Basic
return
$this
->
response
(
"101"
,
'请选择时间'
);
}
$where_
=
[];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
...
...
@@ -191,6 +198,10 @@ class HomePageLog extends Basic
}
if
(
!
empty
(
$params
[
"start_time"
])
&&
!
empty
(
$params
[
"end_time"
]))
{
$time
=
strtotime
(
$params
[
'end_time'
])
-
strtotime
(
$params
[
'start_time'
]);
if
(
$time
>
1296000
||
$time
<
0
)
{
return
$this
->
response
(
101
,
'搜索时间不能大于15天'
);
}
$start_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"start_time"
]);
$end_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"end_time"
]);
$where_
[
"f.create_time"
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
...
...
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