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 f240c990
authored
Oct 28, 2020
by
水库浪子
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
根据员工id获取员工群
1 parent
e201ceeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeGroupController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeGroupController.java
View file @
f240c99
package
com
.
linkwechat
.
web
.
controller
.
wecom
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.core.controller.BaseController
;
import
com.linkwechat.common.core.domain.AjaxResult
;
...
...
@@ -11,6 +12,7 @@ import com.linkwechat.wecom.service.IWeGroupService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -40,6 +42,8 @@ public class WeGroupController extends BaseController {
return
getDataTable
(
list
);
}
@PreAuthorize
(
"@ss.hasPermi('customerManage:group:view')"
)
@GetMapping
({
"/members"
})
public
TableDataInfo
list
(
WeGroupMember
weGroupMember
)
{
...
...
@@ -61,4 +65,19 @@ public class WeGroupController extends BaseController {
return
AjaxResult
.
success
(
WeConstans
.
SYNCH_TIP
);
}
/**
* 根据员工id获取员工相关群
* @param userId
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('customerManage:group:sync')"
)
@GetMapping
({
"/getGroupsByUserId/{userId}"
})
public
AjaxResult
getGroupsByUserId
(
@PathVariable
String
userId
){
return
AjaxResult
.
success
(
weGroupService
.
list
(
new
LambdaQueryWrapper
<
WeGroup
>().
eq
(
WeGroup:
:
getOwner
,
userId
)));
}
}
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