Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
Overview
Overview
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
zhangkb
indicators
Commits
54149001
Commit
54149001
authored
Dec 31, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改操作日志日期筛选问题
parent
b11f2a85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
LoggingEventServiceImpl.java
...bile/indicators/service/impl/LoggingEventServiceImpl.java
+17
-3
LoggingEventMapper.xml
src/main/resources/mybatis/mapping/LoggingEventMapper.xml
+2
-2
No files found.
src/main/java/com/keymobile/indicators/service/impl/LoggingEventServiceImpl.java
View file @
54149001
...
@@ -19,8 +19,13 @@ public class LoggingEventServiceImpl implements LoggingEventService {
...
@@ -19,8 +19,13 @@ public class LoggingEventServiceImpl implements LoggingEventService {
public
List
<
LogStatistics
>
findClassNameAndCount
(
LogQuery
logQuery
)
{
public
List
<
LogStatistics
>
findClassNameAndCount
(
LogQuery
logQuery
)
{
if
(
logQuery
!=
null
){
if
(
logQuery
!=
null
){
logQuery
.
setStartTime
(
this
.
getDateTime
(
logQuery
.
getStartDateStr
()));
logQuery
.
setStartTime
(
this
.
getDateTime
(
logQuery
.
getStartDateStr
()));
logQuery
.
setEndTime
(
this
.
getDateTime
(
logQuery
.
getEndDateStr
()));
Long
endDateTime
=
this
.
getDateTime
(
logQuery
.
getEndDateStr
());
if
(
endDateTime
!=
null
){
endDateTime
=
endDateTime
+
60
*
60
*
24
*
1000
;
//加一天
}
logQuery
.
setEndTime
(
endDateTime
);
}
}
List
<
LogStatistics
>
logStatisticsList
=
loggingEventMapper
.
findClassNameAndCount
(
logQuery
);
List
<
LogStatistics
>
logStatisticsList
=
loggingEventMapper
.
findClassNameAndCount
(
logQuery
);
Collections
.
sort
(
logStatisticsList
,
new
Comparator
<
LogStatistics
>()
{
Collections
.
sort
(
logStatisticsList
,
new
Comparator
<
LogStatistics
>()
{
@Override
@Override
...
@@ -97,7 +102,12 @@ public class LoggingEventServiceImpl implements LoggingEventService {
...
@@ -97,7 +102,12 @@ public class LoggingEventServiceImpl implements LoggingEventService {
public
long
findCountByLogQuery
(
LogQuery
logQuery
)
{
public
long
findCountByLogQuery
(
LogQuery
logQuery
)
{
if
(
logQuery
!=
null
){
if
(
logQuery
!=
null
){
logQuery
.
setStartTime
(
this
.
getDateTime
(
logQuery
.
getStartDateStr
()));
logQuery
.
setStartTime
(
this
.
getDateTime
(
logQuery
.
getStartDateStr
()));
logQuery
.
setEndTime
(
this
.
getDateTime
(
logQuery
.
getEndDateStr
()));
Long
endDateTime
=
this
.
getDateTime
(
logQuery
.
getEndDateStr
());
if
(
endDateTime
!=
null
){
endDateTime
=
endDateTime
+
60
*
60
*
24
*
1000
;
//加一天
}
logQuery
.
setEndTime
(
endDateTime
);
// logQuery.setEndTime(this.getDateTime(logQuery.getEndDateStr()));
}
}
return
loggingEventMapper
.
findCountByLogQuery
(
logQuery
);
return
loggingEventMapper
.
findCountByLogQuery
(
logQuery
);
}
}
...
@@ -106,7 +116,11 @@ public class LoggingEventServiceImpl implements LoggingEventService {
...
@@ -106,7 +116,11 @@ public class LoggingEventServiceImpl implements LoggingEventService {
public
List
<
LoggingEvent
>
findVisitMsg
(
LogQuery
logQuery
)
{
public
List
<
LoggingEvent
>
findVisitMsg
(
LogQuery
logQuery
)
{
if
(
logQuery
!=
null
){
if
(
logQuery
!=
null
){
logQuery
.
setStartTime
(
this
.
getDateTime
(
logQuery
.
getStartDateStr
()));
logQuery
.
setStartTime
(
this
.
getDateTime
(
logQuery
.
getStartDateStr
()));
logQuery
.
setEndTime
(
this
.
getDateTime
(
logQuery
.
getEndDateStr
()));
Long
endDateTime
=
this
.
getDateTime
(
logQuery
.
getEndDateStr
());
if
(
endDateTime
!=
null
){
endDateTime
=
endDateTime
+
60
*
60
*
24
*
1000
;
//加一天
}
logQuery
.
setEndTime
(
endDateTime
);
}
}
return
loggingEventMapper
.
findVisitMsg
(
logQuery
);
return
loggingEventMapper
.
findVisitMsg
(
logQuery
);
}
}
...
...
src/main/resources/mybatis/mapping/LoggingEventMapper.xml
View file @
54149001
...
@@ -40,13 +40,13 @@
...
@@ -40,13 +40,13 @@
and timestmp
>
= #{startTime}
and timestmp
>
= #{startTime}
</if>
</if>
<if
test=
"endTime != null and endTime != ''"
>
<if
test=
"endTime != null and endTime != ''"
>
and timestmp
<
=
#{endTime}
and timestmp
<
#{endTime}
</if>
</if>
<if
test=
"loggerName != null and loggerName!=''"
>
<if
test=
"loggerName != null and loggerName!=''"
>
and arg1 like concat('%',#{loggerName},'%')
and arg1 like concat('%',#{loggerName},'%')
</if>
</if>
<if
test=
"employeeId != null and employeeId!=''"
>
<if
test=
"employeeId != null and employeeId!=''"
>
and arg0 like concat(
#{employeeId},':
%')
and arg0 like concat(
'%',#{employeeId},'
%')
</if>
</if>
<if
test=
"url != null and url!=''"
>
<if
test=
"url != null and url!=''"
>
and arg3 = #{url}
and arg3 = #{url}
...
...
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