Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
bb55cc0b
Commit
bb55cc0b
authored
Dec 04, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
b27912f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
LogService.java
src/main/java/com/egolm/film/api/service/LogService.java
+12
-0
LogServiceImpl.java
.../java/com/egolm/film/api/service/impl/LogServiceImpl.java
+24
-0
AdminLogController.java
...java/com/egolm/film/api/web/admin/AdminLogController.java
+38
-0
No files found.
src/main/java/com/egolm/film/api/service/LogService.java
0 → 100644
View file @
bb55cc0b
package
com
.
egolm
.
film
.
api
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.egolm.common.jdbc.Page
;
public
interface
LogService
{
List
<
Map
<
String
,
Object
>>
queryLogList
(
String
type
,
Page
page
);
}
src/main/java/com/egolm/film/api/service/impl/LogServiceImpl.java
0 → 100644
View file @
bb55cc0b
package
com
.
egolm
.
film
.
api
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.api.service.LogService
;
@Service
public
class
LogServiceImpl
implements
LogService
{
@Autowired
JdbcTemplate
jdbcTemplate
;
@Override
public
List
<
Map
<
String
,
Object
>>
queryLogList
(
String
type
,
Page
page
)
{
return
jdbcTemplate
.
limit
(
"select l.*, le.ext from fc_log l left join fc_log_ext le on le.path = l.path"
,
page
);
}
}
src/main/java/com/egolm/film/api/web/admin/AdminLogController.java
0 → 100644
View file @
bb55cc0b
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.api.service.LogService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
@Controller
@RequestMapping
(
"admin/log"
)
public
class
AdminLogController
{
@Autowired
LogService
service
;
@ResponseBody
@PostMapping
(
"list"
)
@ApiOperation
(
"查询日志"
)
public
Object
list
(
String
type
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
);
List
<
Map
<
String
,
Object
>>
list
=
service
.
queryLogList
(
type
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
);
}
}
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