Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
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
yaru
fgqyxxlr
Commits
47852057
Commit
47852057
authored
Aug 22, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
操作日志记录新增请求方式
parent
e7050f5a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
23 deletions
+47
-23
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
+2
-2
ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html
+5
-0
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
+2
-0
ruoyi-generator/src/main/resources/vm/html/add.html.vm
+2
-2
ruoyi-generator/src/main/resources/vm/html/edit.html.vm
+2
-2
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
+15
-0
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
+18
-17
sql/ry_20190822.sql
+1
-0
No files found.
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
View file @
47852057
...
...
@@ -429,9 +429,9 @@
$
.
bttTable
=
$
(
'#'
+
options
.
id
).
bootstrapTreeTable
({
code
:
options
.
code
,
// 用于设置父子关系
parentCode
:
options
.
parentCode
,
// 用于设置父子关系
type
:
'post'
,
// 请求方式(*)
type
:
'post'
,
// 请求方式(*)
url
:
options
.
url
,
// 请求后台的URL(*)
data
:
options
.
data
,
// 无url时用于渲染的数据
data
:
options
.
data
,
// 无url时用于渲染的数据
ajaxParams
:
options
.
ajaxParams
,
// 请求数据的ajax的data属性
rootIdValue
:
options
.
rootIdValue
,
// 设置指定根节点id值
height
:
options
.
height
,
// 表格树的高度
...
...
ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html
View file @
47852057
...
...
@@ -23,6 +23,11 @@
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
请求方式:
</label>
<div
class=
"form-control-static"
th:text=
"${operLog.requestMethod}"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
操作方法:
</label>
<div
class=
"form-control-static"
th:text=
"${operLog.method}"
>
</div>
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
View file @
47852057
...
...
@@ -104,6 +104,8 @@ public class LogAspect
String
className
=
joinPoint
.
getTarget
().
getClass
().
getName
();
String
methodName
=
joinPoint
.
getSignature
().
getName
();
operLog
.
setMethod
(
className
+
"."
+
methodName
+
"()"
);
// 设置请求方式
operLog
.
setRequestMethod
(
ServletUtils
.
getRequest
().
getMethod
());
// 处理设置注解上的参数
getControllerMethodDescription
(
controllerLog
,
operLog
);
// 保存数据库
...
...
ruoyi-generator/src/main/resources/vm/html/add.html.vm
View file @
47852057
...
...
@@ -66,8 +66,8 @@
<label
class=
"col-sm-3 control-label"
>
${comment}:
</label>
<div
class=
"col-sm-8"
>
<div
class=
"radio-box"
th:each=
"dict : ${@dict.getType('${dictType}')}"
>
<input
type=
"radio"
th:id=
"${'${field}_'
+
dict.dictCode}"
name=
"${field}"
th:value=
"${dict.dictValue}"
th:checked=
"${dict.default}"
#
if
($
column
.
required
)
required
#
end
>
<label
th:for=
"${'${field}_'
+
dict.dictCode}"
th:text=
"${dict.dictLabel}"
></label>
<input
type=
"radio"
th:id=
"${'${field}_'
+
dict.dictCode}"
name=
"${field}"
th:value=
"${dict.dictValue}"
th:checked=
"${dict.default}"
#
if
($
column
.
required
)
required
#
end
>
<label
th:for=
"${'${field}_'
+
dict.dictCode}"
th:text=
"${dict.dictLabel}"
></label>
</div>
</div>
</div>
...
...
ruoyi-generator/src/main/resources/vm/html/edit.html.vm
View file @
47852057
...
...
@@ -66,8 +66,8 @@
<label
class=
"col-sm-3 control-label"
>
${comment}:
</label>
<div
class=
"col-sm-8"
>
<div
class=
"radio-box"
th:each=
"dict : ${@dict.getType('${dictType}')}"
>
<input
type=
"radio"
th:id=
"${'${field}_'
+
dict.dictCode}"
name=
"${field}"
th:value=
"${dict.dictValue}"
th:field=
"*{${field}}"
#
if
($
column
.
required
)
required
#
end
>
<label
th:for=
"${'${field}_'
+
dict.dictCode}"
th:text=
"${dict.dictLabel}"
></label>
<input
type=
"radio"
th:id=
"${'${field}_'
+
dict.dictCode}"
name=
"${field}"
th:value=
"${dict.dictValue}"
th:field=
"*{${field}}"
#
if
($
column
.
required
)
required
#
end
>
<label
th:for=
"${'${field}_'
+
dict.dictCode}"
th:text=
"${dict.dictLabel}"
></label>
</div>
</div>
</div>
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
View file @
47852057
...
...
@@ -35,6 +35,10 @@ public class SysOperLog extends BaseEntity
@Excel
(
name
=
"请求方法"
)
private
String
method
;
/** 请求方式 */
@Excel
(
name
=
"请求方式"
)
private
String
requestMethod
;
/** 操作类别(0其它 1后台用户 2手机端用户) */
@Excel
(
name
=
"操作类别"
,
readConverterExp
=
"0=其它,1=后台用户,2=手机端用户"
)
private
Integer
operatorType
;
...
...
@@ -125,6 +129,16 @@ public class SysOperLog extends BaseEntity
this
.
method
=
method
;
}
public
String
getRequestMethod
()
{
return
requestMethod
;
}
public
void
setRequestMethod
(
String
requestMethod
)
{
this
.
requestMethod
=
requestMethod
;
}
public
Integer
getOperatorType
()
{
return
operatorType
;
...
...
@@ -233,6 +247,7 @@ public class SysOperLog extends BaseEntity
.
append
(
"businessType"
,
getBusinessType
())
.
append
(
"businessTypes"
,
getBusinessTypes
())
.
append
(
"method"
,
getMethod
())
.
append
(
"requestMethod"
,
getRequestMethod
())
.
append
(
"operatorType"
,
getOperatorType
())
.
append
(
"operName"
,
getOperName
())
.
append
(
"deptName"
,
getDeptName
())
...
...
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
View file @
47852057
...
...
@@ -5,30 +5,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper
namespace=
"com.ruoyi.system.mapper.SysOperLogMapper"
>
<resultMap
type=
"SysOperLog"
id=
"SysOperLogResult"
>
<id
property=
"operId"
column=
"oper_id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"businessType"
column=
"business_type"
/>
<result
property=
"method"
column=
"method"
/>
<result
property=
"operatorType"
column=
"operator_type"
/>
<result
property=
"operName"
column=
"oper_name"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"operUrl"
column=
"oper_url"
/>
<result
property=
"operIp"
column=
"oper_ip"
/>
<result
property=
"operLocation"
column=
"oper_location"
/>
<result
property=
"operParam"
column=
"oper_param"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"errorMsg"
column=
"error_msg"
/>
<result
property=
"operTime"
column=
"oper_time"
/>
<id
property=
"operId"
column=
"oper_id"
/>
<result
property=
"title"
column=
"title"
/>
<result
property=
"businessType"
column=
"business_type"
/>
<result
property=
"method"
column=
"method"
/>
<result
property=
"requestMethod"
column=
"request_method"
/>
<result
property=
"operatorType"
column=
"operator_type"
/>
<result
property=
"operName"
column=
"oper_name"
/>
<result
property=
"deptName"
column=
"dept_name"
/>
<result
property=
"operUrl"
column=
"oper_url"
/>
<result
property=
"operIp"
column=
"oper_ip"
/>
<result
property=
"operLocation"
column=
"oper_location"
/>
<result
property=
"operParam"
column=
"oper_param"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"errorMsg"
column=
"error_msg"
/>
<result
property=
"operTime"
column=
"oper_time"
/>
</resultMap>
<sql
id=
"selectOperLogVo"
>
select oper_id, title, business_type, method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time
select oper_id, title, business_type, method,
request_method,
operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time
from sys_oper_log
</sql>
<insert
id=
"insertOperlog"
parameterType=
"SysOperLog"
>
insert into sys_oper_log(title, business_type, method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time)
values (#{title}, #{businessType}, #{method}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{status}, #{errorMsg}, sysdate())
insert into sys_oper_log(title, business_type, method,
request_method,
operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time)
values (#{title}, #{businessType}, #{method}, #{
requestMethod}, #{
operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{status}, #{errorMsg}, sysdate())
</insert>
<select
id=
"selectOperLogList"
parameterType=
"SysOperLog"
resultMap=
"SysOperLogResult"
>
...
...
sql/ry_201908
08
.sql
→
sql/ry_201908
22
.sql
View file @
47852057
...
...
@@ -408,6 +408,7 @@ create table sys_oper_log (
title
varchar
(
50
)
default
''
comment
'模块标题'
,
business_type
int
(
2
)
default
0
comment
'业务类型(0其它 1新增 2修改 3删除)'
,
method
varchar
(
100
)
default
''
comment
'方法名称'
,
request_method
varchar
(
10
)
default
''
comment
'请求方式'
,
operator_type
int
(
1
)
default
0
comment
'操作类别(0其它 1后台用户 2手机端用户)'
,
oper_name
varchar
(
50
)
default
''
comment
'操作人员'
,
dept_name
varchar
(
50
)
default
''
comment
'部门名称'
,
...
...
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