Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kyb-search
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
万建斌
kyb-search
Commits
0d3b6a39
Commit
0d3b6a39
authored
Nov 22, 2019
by
万建斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2019-11-22 优化
parent
b74c93fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
LogEntity.java
src/main/java/com/cesgroup/kingkong/entity/LogEntity.java
+2
-0
SearchContrllor.java
src/main/java/com/cesgroup/kingkong/web/SearchContrllor.java
+4
-3
No files found.
src/main/java/com/cesgroup/kingkong/entity/LogEntity.java
View file @
0d3b6a39
...
...
@@ -20,6 +20,8 @@ public class LogEntity {
@TableId
private
int
id
;
private
String
name
;
private
long
processTime
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
...
...
src/main/java/com/cesgroup/kingkong/web/SearchContrllor.java
View file @
0d3b6a39
...
...
@@ -67,14 +67,15 @@ public class SearchContrllor {
panResult
.
error
(
"查询参数错误"
);
panResult
.
setRespCode
(
1012
);
}
insertLog
(
before
);
insertLog
(
before
,
"/v1/queryById"
);
return
panResult
;
}
private
void
insertLog
(
long
before
)
{
private
void
insertLog
(
long
before
,
String
name
)
{
long
after
=
new
Date
().
getTime
();
long
processing
=
after
-
before
;
LogEntity
logEntity
=
new
LogEntity
();
logEntity
.
setName
(
name
);
logEntity
.
setProcessTime
(
processing
);
logEntity
.
setCreateTime
(
new
Date
());
logService
.
save
(
logEntity
);
...
...
@@ -100,7 +101,7 @@ public class SearchContrllor {
Map
<
String
,
Object
>
resMap
=
new
HashMap
<>();
resMap
.
put
(
"result"
,
parseResult
(
result
));
panResult
.
setRespData
(
resMap
);
insertLog
(
before
);
insertLog
(
before
,
"/v1/queryArticleInfo"
);
return
panResult
;
}
...
...
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