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 fd2c7685
authored
Oct 28, 2020
by
水库浪子
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口增加权限
1 parent
819b87e4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
38 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeDepartmentController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeGroupController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeTagGroupController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerController.java
View file @
fd2c768
...
...
@@ -39,7 +39,7 @@ public class WeCustomerController extends BaseController
/**
* 查询企业微信客户列表
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom
:customer:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage
:customer:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
WeCustomer
weCustomer
)
{
...
...
@@ -48,23 +48,23 @@ public class WeCustomerController extends BaseController
return
getDataTable
(
list
);
}
/**
* 导出企业微信客户列表
*/
@PreAuthorize
(
"@ss.hasPermi('wecom:customer:export')"
)
@Log
(
title
=
"企业微信客户"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
WeCustomer
weCustomer
)
{
List
<
WeCustomer
>
list
=
weCustomerService
.
selectWeCustomerList
(
weCustomer
);
ExcelUtil
<
WeCustomer
>
util
=
new
ExcelUtil
<
WeCustomer
>(
WeCustomer
.
class
);
return
util
.
exportExcel
(
list
,
"customer"
);
}
//
/**
//
* 导出企业微信客户列表
//
*/
//
@PreAuthorize("@ss.hasPermi('wecom:customer:export')")
//
@Log(title = "企业微信客户", businessType = BusinessType.EXPORT)
//
@GetMapping("/export")
//
public AjaxResult export(WeCustomer weCustomer)
//
{
//
List<WeCustomer> list = weCustomerService.selectWeCustomerList(weCustomer);
//
ExcelUtil<WeCustomer> util = new ExcelUtil<WeCustomer>(WeCustomer.class);
//
return util.exportExcel(list, "customer");
//
}
/**
* 获取企业微信客户详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:customer:query
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:customer:view
')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -89,7 +89,7 @@ public class WeCustomerController extends BaseController
* 客户同步接口
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:customer:synchWeCustomer
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:customer:sync
')"
)
@Log
(
title
=
"企业微信客户同步接口"
,
businessType
=
BusinessType
.
DELETE
)
@GetMapping
(
"/synchWeCustomer"
)
public
AjaxResult
synchWeCustomer
(){
...
...
@@ -106,7 +106,7 @@ public class WeCustomerController extends BaseController
* @param weMakeCustomerTag
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:customer:makeLabel
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage/customer:makeTag
')"
)
@Log
(
title
=
"客户打标签"
,
businessType
=
BusinessType
.
UPDATE
)
@PostMapping
(
"/makeLabel"
)
public
AjaxResult
makeLabel
(
@RequestBody
WeMakeCustomerTag
weMakeCustomerTag
){
...
...
@@ -121,7 +121,7 @@ public class WeCustomerController extends BaseController
* 移除客户标签
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:customer:removeLabel
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:customer:removeTag
')"
)
@Log
(
title
=
"移除客户标签"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/removeLabel"
)
public
AjaxResult
removeLabel
(
@RequestBody
WeMakeCustomerTag
weMakeCustomerTag
){
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeDepartmentController.java
View file @
fd2c768
...
...
@@ -33,7 +33,7 @@ public class WeDepartmentController extends BaseController
/**
* 查询企业微信组织架构相关列表
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:department
:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization
:list')"
)
@GetMapping
(
"/list"
)
@ApiOperation
(
"获取部门列表"
)
public
AjaxResult
list
()
...
...
@@ -47,7 +47,7 @@ public class WeDepartmentController extends BaseController
/**
* 新增企业微信组织架构相关
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:department:add
')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:addMember
')"
)
@Log
(
title
=
"企业微信组织架构相关"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@ApiOperation
(
"添加部门"
)
...
...
@@ -60,7 +60,7 @@ public class WeDepartmentController extends BaseController
/**
* 修改企业微信组织架构相关
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:department:edit
')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:editDep
')"
)
@Log
(
title
=
"企业微信组织架构相关"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@ApiOperation
(
"更新部门"
)
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeGroupController.java
View file @
fd2c768
...
...
@@ -32,7 +32,7 @@ public class WeGroupController extends BaseController {
@Autowired
private
IWeGroupMemberService
weGroupMemberService
;
@PreAuthorize
(
"@ss.hasPermi('
wecom
:group:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage
:group:list')"
)
@GetMapping
({
"/list"
})
public
TableDataInfo
list
(
WeGroup
weGroup
)
{
startPage
();
...
...
@@ -40,7 +40,7 @@ public class WeGroupController extends BaseController {
return
getDataTable
(
list
);
}
@PreAuthorize
(
"@ss.hasPermi('
wecom:member:list
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:group:view
')"
)
@GetMapping
({
"/members"
})
public
TableDataInfo
list
(
WeGroupMember
weGroupMember
)
{
startPage
();
...
...
@@ -52,7 +52,7 @@ public class WeGroupController extends BaseController {
* 同步客户群
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:group:synchWeGroup
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:group:sync
')"
)
@GetMapping
({
"/synchWeGroup"
})
public
AjaxResult
synchWeGroup
(){
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeTagGroupController.java
View file @
fd2c768
...
...
@@ -36,7 +36,7 @@ public class WeTagGroupController extends BaseController
/**
* 查询标签组列表
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:group
:list')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:tag
:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
WeTagGroup
weTagGroup
)
{
...
...
@@ -51,7 +51,7 @@ public class WeTagGroupController extends BaseController
/**
* 新增标签组
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:group
:add')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:tag
:add')"
)
@Log
(
title
=
"标签组"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
WeTagGroup
weTagGroup
)
...
...
@@ -64,7 +64,7 @@ public class WeTagGroupController extends BaseController
/**
* 修改标签组
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:group
:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:tag
:edit')"
)
@Log
(
title
=
"标签组"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
WeTagGroup
weTagGroup
)
...
...
@@ -76,7 +76,7 @@ public class WeTagGroupController extends BaseController
/**
* 删除标签组
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:group
:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:tag
:remove')"
)
@Log
(
title
=
"标签组"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
String
[]
ids
)
...
...
@@ -89,7 +89,7 @@ public class WeTagGroupController extends BaseController
* 同步标签
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:group:synchWeTags
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:tag:sync
')"
)
@GetMapping
(
"/synchWeTags"
)
public
AjaxResult
synchWeTags
(){
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeUserController.java
View file @
fd2c768
...
...
@@ -41,7 +41,7 @@ public class WeUserController extends BaseController {
/**
* 查询通讯录相关客户列表
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:list
')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:query
')"
)
@GetMapping
(
"/list"
)
@ApiOperation
(
"获取通讯录人员列表"
)
public
TableDataInfo
list
(
WeUser
weUser
)
...
...
@@ -57,7 +57,7 @@ public class WeUserController extends BaseController {
/**
* 获取通讯录相关客户详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:query
')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:view
')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -67,7 +67,7 @@ public class WeUserController extends BaseController {
/**
* 新增通讯录相关客户
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:add
')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:addMember
')"
)
@Log
(
title
=
"通讯录相关客户"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@ApiOperation
(
"新增通讯录客户"
)
...
...
@@ -80,7 +80,7 @@ public class WeUserController extends BaseController {
/**
* 修改通讯录相关客户
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user
:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization
:edit')"
)
@Log
(
title
=
"更新通讯录客户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@ApiOperation
(
"更新通讯录客户"
)
...
...
@@ -96,7 +96,7 @@ public class WeUserController extends BaseController {
* @param weUser
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:startOrStop
')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:forbidden
')"
)
@Log
(
title
=
"启用禁用用户"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/startOrStop"
)
@ApiOperation
(
"是否启用(1表示启用成员,0表示禁用成员)"
)
...
...
@@ -113,7 +113,7 @@ public class WeUserController extends BaseController {
* @param weLeaveUserVo
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:leaveUserAllocateList
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:dimission:filter
')"
)
@GetMapping
({
"/leaveUserAllocateList"
})
public
TableDataInfo
leaveUserAllocateList
(
WeLeaveUserVo
weLeaveUserVo
)
{
startPage
();
...
...
@@ -129,7 +129,7 @@ public class WeUserController extends BaseController {
* @param weLeaveUserVo
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:leaveUserNoAllocateList
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:dimission:query
')"
)
@GetMapping
({
"/leaveUserNoAllocateList"
})
public
TableDataInfo
leaveUserNoAllocateList
(
WeLeaveUserVo
weLeaveUserVo
)
{
startPage
();
...
...
@@ -145,7 +145,7 @@ public class WeUserController extends BaseController {
* @param weLeaveUserInfoAllocateVo
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:allocateLeaveUserAboutData
')"
)
@PreAuthorize
(
"@ss.hasPermi('
customerManage:dimission:allocate
')"
)
@PutMapping
({
"/allocateLeaveUserAboutData"
})
public
AjaxResult
allocateLeaveUserAboutData
(
@RequestBody
WeLeaveUserInfoAllocateVo
weLeaveUserInfoAllocateVo
)
{
...
...
@@ -159,7 +159,7 @@ public class WeUserController extends BaseController {
* 同步成员
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:synchWeUser
')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:sync
')"
)
@GetMapping
({
"/synchWeUser"
})
public
AjaxResult
synchWeUser
(){
...
...
@@ -174,7 +174,7 @@ public class WeUserController extends BaseController {
* 删除用户
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('
wecom:user:deleteUs
er')"
)
@PreAuthorize
(
"@ss.hasPermi('
contacts:organization:removeMemb
er')"
)
@DeleteMapping
({
"/{ids}"
})
public
AjaxResult
deleteUser
(
@PathVariable
String
[]
ids
){
...
...
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