Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
d7d06ae1
Commit
d7d06ae1
authored
Apr 19, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加清空日志功能
parent
eb529a77
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
0 deletions
+33
-0
sql/guns.sql
+0
-0
src/main/java/com/stylefeng/guns/modular/system/controller/LogController.java
+11
-0
src/main/webapp/WEB-INF/view/system/log/log.html
+1
-0
src/main/webapp/static/js/common/Feng.js
+10
-0
src/main/webapp/static/modular/system/log/log.js
+11
-0
No files found.
sql/guns.sql
View file @
d7d06ae1
This diff is collapsed.
Click to expand it.
src/main/java/com/stylefeng/guns/modular/system/controller/LogController.java
View file @
d7d06ae1
package
com
.
stylefeng
.
guns
.
modular
.
system
.
controller
;
import
com.baomidou.mybatisplus.mapper.SqlRunner
;
import
com.baomidou.mybatisplus.plugins.Page
;
import
com.stylefeng.guns.common.constant.factory.PageFactory
;
import
com.stylefeng.guns.common.controller.BaseController
;
...
...
@@ -66,4 +67,14 @@ public class LogController extends BaseController {
Map
<
String
,
Object
>
stringObjectMap
=
BeanKit
.
beanToMap
(
operationLog
);
return
super
.
warpObject
(
new
LogWarpper
(
stringObjectMap
));
}
/**
* 清空日志
*/
@RequestMapping
(
"/delLog"
)
@ResponseBody
public
Object
delLog
()
{
SqlRunner
.
db
().
delete
(
"delete from _operation_log"
);
return
super
.
SUCCESS_TIP
;
}
}
src/main/webapp/WEB-INF/view/system/log/log.html
View file @
d7d06ae1
...
...
@@ -24,6 +24,7 @@
</div>
<div
class=
"hidden-xs"
id=
"OptLogTableToolbar"
role=
"group"
>
<
#
button
name=
"查看详情"
icon=
"fa-plus"
clickFun=
"OptLog.detail()"
/>
<
#
button
name=
"清空日志"
icon=
"fa-plus"
clickFun=
"OptLog.delLog()"
/>
</div>
<
#
table
id=
"OptLogTable"
/>
</div>
...
...
src/main/webapp/static/js/common/Feng.js
View file @
d7d06ae1
...
...
@@ -5,6 +5,16 @@ var Feng = {
this
.
ctxPath
=
ctx
;
}
},
confirm
:
function
(
tip
,
ensure
){
//询问框
parent
.
layer
.
confirm
(
tip
,
{
btn
:
[
'确定'
,
'取消'
]
},
function
(
index
){
ensure
();
parent
.
layer
.
close
(
index
);
},
function
(
index
){
parent
.
layer
.
close
(
index
);
});
},
log
:
function
(
info
)
{
console
.
log
(
info
);
},
...
...
src/main/webapp/static/modular/system/log/log.js
View file @
d7d06ae1
...
...
@@ -59,6 +59,17 @@ OptLog.detail = function () {
}
};
/**
* 清空日志
*/
OptLog
.
delLog
=
function
()
{
// Feng.confirm("是否清空所有日志?",function(){
var
ajax
=
Feng
.
baseAjax
(
"/log/delLog"
,
"清空日志"
);
ajax
.
start
();
// });
}
/**
* 查询日志列表
*/
...
...
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