Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8ff980bb
authored
Aug 25, 2021
by
孙喜旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
审计管理接口添加swagger注解
1 parent
fe6ad03d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
12 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeSensitiveActController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeSensitiveController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeSensitiveActController.java
View file @
8ff980b
...
@@ -11,6 +11,8 @@ import com.linkwechat.wecom.domain.WeSensitiveAct;
...
@@ -11,6 +11,8 @@ import com.linkwechat.wecom.domain.WeSensitiveAct;
import
com.linkwechat.wecom.domain.WeSensitiveActHit
;
import
com.linkwechat.wecom.domain.WeSensitiveActHit
;
import
com.linkwechat.wecom.service.IWeSensitiveActHitService
;
import
com.linkwechat.wecom.service.IWeSensitiveActHitService
;
import
com.linkwechat.wecom.service.IWeSensitiveActService
;
import
com.linkwechat.wecom.service.IWeSensitiveActService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
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.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -27,6 +29,7 @@ import java.util.stream.Collectors;
...
@@ -27,6 +29,7 @@ import java.util.stream.Collectors;
* @version 1.0
* @version 1.0
* @date 2021/1/12 18:07
* @date 2021/1/12 18:07
*/
*/
@Api
(
tags
=
"敏感行为管理接口"
)
@RestController
@RestController
@RequestMapping
(
"/wecom/sensitive/act"
)
@RequestMapping
(
"/wecom/sensitive/act"
)
public
class
WeSensitiveActController
extends
BaseController
{
public
class
WeSensitiveActController
extends
BaseController
{
...
@@ -40,8 +43,9 @@ public class WeSensitiveActController extends BaseController {
...
@@ -40,8 +43,9 @@ public class WeSensitiveActController extends BaseController {
* 查询敏感行为列表
* 查询敏感行为列表
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:list')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:list')")
@ApiOperation
(
value
=
"查询敏感行为列表"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
WeSensitiveAct
weSensitiveAct
)
{
public
TableDataInfo
<
List
<
WeSensitiveAct
>>
list
(
WeSensitiveAct
weSensitiveAct
)
{
startPage
();
startPage
();
List
<
WeSensitiveAct
>
list
=
weSensitiveActService
.
selectWeSensitiveActList
(
weSensitiveAct
);
List
<
WeSensitiveAct
>
list
=
weSensitiveActService
.
selectWeSensitiveActList
(
weSensitiveAct
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
...
@@ -51,8 +55,9 @@ public class WeSensitiveActController extends BaseController {
...
@@ -51,8 +55,9 @@ public class WeSensitiveActController extends BaseController {
* 获取敏感行为详细信息
* 获取敏感行为详细信息
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:query')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:query')")
@ApiOperation
(
value
=
"获取敏感行为详细信息"
,
httpMethod
=
"GET"
)
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
public
AjaxResult
<
WeSensitiveAct
>
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
weSensitiveActService
.
selectWeSensitiveActById
(
id
));
return
AjaxResult
.
success
(
weSensitiveActService
.
selectWeSensitiveActById
(
id
));
}
}
...
@@ -60,6 +65,7 @@ public class WeSensitiveActController extends BaseController {
...
@@ -60,6 +65,7 @@ public class WeSensitiveActController extends BaseController {
* 新增敏感行为设置
* 新增敏感行为设置
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:add')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:add')")
@ApiOperation
(
value
=
"新增敏感行为设置"
,
httpMethod
=
"POST"
)
@Log
(
title
=
"新增敏感行为"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"新增敏感行为"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
public
AjaxResult
add
(
@Valid
@RequestBody
WeSensitiveAct
weSensitiveAct
)
{
public
AjaxResult
add
(
@Valid
@RequestBody
WeSensitiveAct
weSensitiveAct
)
{
...
@@ -67,9 +73,10 @@ public class WeSensitiveActController extends BaseController {
...
@@ -67,9 +73,10 @@ public class WeSensitiveActController extends BaseController {
}
}
/**
/**
* 修改敏感
词设置
* 修改敏感
行为
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:edit')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:edit')")
@ApiOperation
(
value
=
"修改敏感行为"
,
httpMethod
=
"PUT"
)
@Log
(
title
=
"修改敏感行为"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"修改敏感行为"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
public
AjaxResult
edit
(
@RequestBody
WeSensitiveAct
weSensitiveAct
)
{
public
AjaxResult
edit
(
@RequestBody
WeSensitiveAct
weSensitiveAct
)
{
...
@@ -82,9 +89,10 @@ public class WeSensitiveActController extends BaseController {
...
@@ -82,9 +89,10 @@ public class WeSensitiveActController extends BaseController {
}
}
/**
/**
* 删除敏感
词设置
* 删除敏感
行为
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:remove')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveact:remove')")
@ApiOperation
(
value
=
"删除敏感行为"
,
httpMethod
=
"DELETE"
)
@Log
(
title
=
"删除敏感行为"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"删除敏感行为"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
(
"ids"
)
String
ids
)
{
public
AjaxResult
remove
(
@PathVariable
(
"ids"
)
String
ids
)
{
...
@@ -95,11 +103,12 @@ public class WeSensitiveActController extends BaseController {
...
@@ -95,11 +103,12 @@ public class WeSensitiveActController extends BaseController {
}
}
/**
/**
* 敏感
词
命中查询
* 敏感
行为
命中查询
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveacthit:list')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveacthit:list')")
@ApiOperation
(
value
=
"敏感行为命中查询(这个接口有问题)"
,
httpMethod
=
"GET"
)
@GetMapping
(
"/hit/list"
)
@GetMapping
(
"/hit/list"
)
public
TableDataInfo
hitList
()
{
public
TableDataInfo
<
List
<
WeSensitiveActHit
>>
hitList
()
{
startPage
();
startPage
();
List
<
WeSensitiveActHit
>
list
=
weSensitiveActHitService
.
list
();
List
<
WeSensitiveActHit
>
list
=
weSensitiveActHitService
.
list
();
return
getDataTable
(
list
);
return
getDataTable
(
list
);
...
@@ -109,6 +118,7 @@ public class WeSensitiveActController extends BaseController {
...
@@ -109,6 +118,7 @@ public class WeSensitiveActController extends BaseController {
* 导出敏感行为记录
* 导出敏感行为记录
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveacthit:export')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitiveacthit:export')")
@ApiOperation
(
value
=
"导出敏感行为记录"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/hit/export"
)
@PostMapping
(
"/hit/export"
)
public
AjaxResult
export
()
{
public
AjaxResult
export
()
{
List
<
WeSensitiveActHit
>
list
=
weSensitiveActHitService
.
list
();
List
<
WeSensitiveActHit
>
list
=
weSensitiveActHitService
.
list
();
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeSensitiveController.java
View file @
8ff980b
...
@@ -38,7 +38,7 @@ public class WeSensitiveController extends BaseController {
...
@@ -38,7 +38,7 @@ public class WeSensitiveController extends BaseController {
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:list')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ApiOperation
(
"查询敏感词列表
"
)
@ApiOperation
(
value
=
"查询敏感词列表"
,
httpMethod
=
"GET
"
)
public
TableDataInfo
<
List
<
WeSensitive
>>
list
(
WeSensitive
weSensitive
)
{
public
TableDataInfo
<
List
<
WeSensitive
>>
list
(
WeSensitive
weSensitive
)
{
startPage
();
startPage
();
List
<
WeSensitive
>
list
=
weSensitiveService
.
selectWeSensitiveList
(
weSensitive
);
List
<
WeSensitive
>
list
=
weSensitiveService
.
selectWeSensitiveList
(
weSensitive
);
...
@@ -50,7 +50,7 @@ public class WeSensitiveController extends BaseController {
...
@@ -50,7 +50,7 @@ public class WeSensitiveController extends BaseController {
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:query')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:query')")
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
@ApiOperation
(
"查询敏感词详情
"
)
@ApiOperation
(
value
=
"查询敏感词详情"
,
httpMethod
=
"GET
"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
AjaxResult
.
success
(
weSensitiveService
.
selectWeSensitiveById
(
id
));
return
AjaxResult
.
success
(
weSensitiveService
.
selectWeSensitiveById
(
id
));
}
}
...
@@ -61,7 +61,7 @@ public class WeSensitiveController extends BaseController {
...
@@ -61,7 +61,7 @@ public class WeSensitiveController extends BaseController {
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:add')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:add')")
@Log
(
title
=
"敏感词设置"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"敏感词设置"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
@ApiOperation
(
"添加敏感词
"
)
@ApiOperation
(
value
=
"添加敏感词"
,
httpMethod
=
"POST
"
)
public
AjaxResult
add
(
@Valid
@RequestBody
WeSensitive
weSensitive
)
{
public
AjaxResult
add
(
@Valid
@RequestBody
WeSensitive
weSensitive
)
{
return
toAjax
(
weSensitiveService
.
insertWeSensitive
(
weSensitive
));
return
toAjax
(
weSensitiveService
.
insertWeSensitive
(
weSensitive
));
}
}
...
@@ -72,7 +72,7 @@ public class WeSensitiveController extends BaseController {
...
@@ -72,7 +72,7 @@ public class WeSensitiveController extends BaseController {
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:edit')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:edit')")
@Log
(
title
=
"敏感词设置"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"敏感词设置"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
@ApiOperation
(
"修改敏感词
"
)
@ApiOperation
(
value
=
"修改敏感词"
,
httpMethod
=
"PUT
"
)
public
AjaxResult
edit
(
@Valid
@RequestBody
WeSensitive
weSensitive
)
{
public
AjaxResult
edit
(
@Valid
@RequestBody
WeSensitive
weSensitive
)
{
Long
id
=
weSensitive
.
getId
();
Long
id
=
weSensitive
.
getId
();
WeSensitive
originData
=
weSensitiveService
.
selectWeSensitiveById
(
id
);
WeSensitive
originData
=
weSensitiveService
.
selectWeSensitiveById
(
id
);
...
@@ -88,7 +88,7 @@ public class WeSensitiveController extends BaseController {
...
@@ -88,7 +88,7 @@ public class WeSensitiveController extends BaseController {
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:remove')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitive:remove')")
@Log
(
title
=
"敏感词设置"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"敏感词设置"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
@ApiOperation
(
"删除敏感词
"
)
@ApiOperation
(
value
=
"删除敏感词"
,
httpMethod
=
"DELETE
"
)
public
AjaxResult
remove
(
@PathVariable
(
"ids"
)
String
ids
)
{
public
AjaxResult
remove
(
@PathVariable
(
"ids"
)
String
ids
)
{
String
[]
id
=
ids
.
split
(
","
);
String
[]
id
=
ids
.
split
(
","
);
Long
[]
idArray
=
new
Long
[
id
.
length
];
Long
[]
idArray
=
new
Long
[
id
.
length
];
...
@@ -101,7 +101,7 @@ public class WeSensitiveController extends BaseController {
...
@@ -101,7 +101,7 @@ public class WeSensitiveController extends BaseController {
*/
*/
// @PreAuthorize("@ss.hasPermi('wecom:sensitivehit:list')")
// @PreAuthorize("@ss.hasPermi('wecom:sensitivehit:list')")
@GetMapping
(
"/hit/list"
)
@GetMapping
(
"/hit/list"
)
@ApiOperation
(
"敏感词命中查询
"
)
@ApiOperation
(
value
=
"敏感词命中查询"
,
httpMethod
=
"GET
"
)
public
TableDataInfo
<
List
<
WeChatContactSensitiveMsgVO
>>
hitList
(
WeSensitiveHitQuery
query
)
{
public
TableDataInfo
<
List
<
WeChatContactSensitiveMsgVO
>>
hitList
(
WeSensitiveHitQuery
query
)
{
return
getDataTable
(
weSensitiveService
.
getHitSensitiveList
(
query
));
return
getDataTable
(
weSensitiveService
.
getHitSensitiveList
(
query
));
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment