Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vehicle-quality-review
Project
Project
Details
Activity
Releases
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
王飞
vehicle-quality-review
Commits
7716e46e
Commit
7716e46e
authored
Dec 27, 2023
by
王飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor
1、SysUserController 增加链路追踪。 Reference N/A
parent
55c16e55
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
SysUserController.java
...va/com/ruoyi/web/controller/system/SysUserController.java
+29
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
View file @
7716e46e
...
@@ -4,6 +4,9 @@ import java.util.List;
...
@@ -4,6 +4,9 @@ import java.util.List;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.apache.skywalking.apm.toolkit.trace.Tag
;
import
org.apache.skywalking.apm.toolkit.trace.Tags
;
import
org.apache.skywalking.apm.toolkit.trace.Trace
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
...
@@ -56,6 +59,8 @@ public class SysUserController extends BaseController
...
@@ -56,6 +59,8 @@ public class SysUserController extends BaseController
/**
/**
* 获取用户列表
* 获取用户列表
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SysUser
user
)
public
TableDataInfo
list
(
SysUser
user
)
...
@@ -65,6 +70,8 @@ public class SysUserController extends BaseController
...
@@ -65,6 +70,8 @@ public class SysUserController extends BaseController
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
EXPORT
)
@PreAuthorize
(
"@ss.hasPermi('system:user:export')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:export')"
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
...
@@ -75,6 +82,8 @@ public class SysUserController extends BaseController
...
@@ -75,6 +82,8 @@ public class SysUserController extends BaseController
util
.
exportExcel
(
response
,
list
,
"用户数据"
);
util
.
exportExcel
(
response
,
list
,
"用户数据"
);
}
}
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
IMPORT
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
IMPORT
)
@PreAuthorize
(
"@ss.hasPermi('system:user:import')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:import')"
)
@PostMapping
(
"/importData"
)
@PostMapping
(
"/importData"
)
...
@@ -87,6 +96,8 @@ public class SysUserController extends BaseController
...
@@ -87,6 +96,8 @@ public class SysUserController extends BaseController
return
success
(
message
);
return
success
(
message
);
}
}
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PostMapping
(
"/importTemplate"
)
@PostMapping
(
"/importTemplate"
)
public
void
importTemplate
(
HttpServletResponse
response
)
public
void
importTemplate
(
HttpServletResponse
response
)
{
{
...
@@ -97,6 +108,8 @@ public class SysUserController extends BaseController
...
@@ -97,6 +108,8 @@ public class SysUserController extends BaseController
/**
/**
* 根据用户编号获取详细信息
* 根据用户编号获取详细信息
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:query')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:query')"
)
@GetMapping
(
value
=
{
"/"
,
"/{userId}"
})
@GetMapping
(
value
=
{
"/"
,
"/{userId}"
})
public
AjaxResult
getInfo
(
@PathVariable
(
value
=
"userId"
,
required
=
false
)
Long
userId
)
public
AjaxResult
getInfo
(
@PathVariable
(
value
=
"userId"
,
required
=
false
)
Long
userId
)
...
@@ -119,6 +132,8 @@ public class SysUserController extends BaseController
...
@@ -119,6 +132,8 @@ public class SysUserController extends BaseController
/**
/**
* 新增用户
* 新增用户
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:add')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:add')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
...
@@ -144,6 +159,8 @@ public class SysUserController extends BaseController
...
@@ -144,6 +159,8 @@ public class SysUserController extends BaseController
/**
/**
* 修改用户
* 修改用户
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
...
@@ -170,6 +187,8 @@ public class SysUserController extends BaseController
...
@@ -170,6 +187,8 @@ public class SysUserController extends BaseController
/**
/**
* 删除用户
* 删除用户
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:remove')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{userIds}"
)
@DeleteMapping
(
"/{userIds}"
)
...
@@ -185,6 +204,8 @@ public class SysUserController extends BaseController
...
@@ -185,6 +204,8 @@ public class SysUserController extends BaseController
/**
/**
* 重置密码
* 重置密码
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:resetPwd')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:resetPwd')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/resetPwd"
)
@PutMapping
(
"/resetPwd"
)
...
@@ -200,6 +221,8 @@ public class SysUserController extends BaseController
...
@@ -200,6 +221,8 @@ public class SysUserController extends BaseController
/**
/**
* 状态修改
* 状态修改
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/changeStatus"
)
@PutMapping
(
"/changeStatus"
)
...
@@ -214,6 +237,8 @@ public class SysUserController extends BaseController
...
@@ -214,6 +237,8 @@ public class SysUserController extends BaseController
/**
/**
* 根据用户编号获取授权角色
* 根据用户编号获取授权角色
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:query')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:query')"
)
@GetMapping
(
"/authRole/{userId}"
)
@GetMapping
(
"/authRole/{userId}"
)
public
AjaxResult
authRole
(
@PathVariable
(
"userId"
)
Long
userId
)
public
AjaxResult
authRole
(
@PathVariable
(
"userId"
)
Long
userId
)
...
@@ -229,6 +254,8 @@ public class SysUserController extends BaseController
...
@@ -229,6 +254,8 @@ public class SysUserController extends BaseController
/**
/**
* 用户授权角色
* 用户授权角色
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:edit')"
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
GRANT
)
@Log
(
title
=
"用户管理"
,
businessType
=
BusinessType
.
GRANT
)
@PutMapping
(
"/authRole"
)
@PutMapping
(
"/authRole"
)
...
@@ -242,6 +269,8 @@ public class SysUserController extends BaseController
...
@@ -242,6 +269,8 @@ public class SysUserController extends BaseController
/**
/**
* 获取部门树列表
* 获取部门树列表
*/
*/
@Trace
@Tags
({
@Tag
(
key
=
"param"
,
value
=
"arg[0]"
),
@Tag
(
key
=
"result"
,
value
=
"returnedObj"
)})
@PreAuthorize
(
"@ss.hasPermi('system:user:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:user:list')"
)
@GetMapping
(
"/deptTree"
)
@GetMapping
(
"/deptTree"
)
public
AjaxResult
deptTree
(
SysDept
dept
)
public
AjaxResult
deptTree
(
SysDept
dept
)
...
...
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