WeGroupController.java
1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.linkwechat.web.controller.wecom;
import com.linkwechat.common.constant.WeConstans;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.wecom.domain.WeGroup;
import com.linkwechat.wecom.domain.WeGroupMember;
import com.linkwechat.wecom.service.IWeGroupMemberService;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 群组相关
* @Author: Robin
* @Description:
* @Date: create in 2020/9/21 0021 23:53
*/
@RestController
@RequestMapping("/wecom/group/chat")
public class WeGroupController extends BaseController {
@Autowired
private IWeGroupService weGroupService;
@Autowired
private IWeGroupMemberService weGroupMemberService;
@PreAuthorize("@ss.hasPermi('wecom:group:list')")
@GetMapping({"/list"})
public TableDataInfo list(WeGroup weGroup) {
startPage();
List<WeGroup> list = this.weGroupService.selectWeGroupList(weGroup);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('wecom:member:list')")
@GetMapping({"/members"})
public TableDataInfo list(WeGroupMember weGroupMember) {
startPage();
List<WeGroupMember> list = this.weGroupMemberService.selectWeGroupMemberList(weGroupMember);
return getDataTable(list);
}
/**
* 同步客户群
* @return
*/
@PreAuthorize("@ss.hasPermi('wecom:group:synchWeGroup')")
@GetMapping({"/synchWeGroup"})
public AjaxResult synchWeGroup(){
weGroupService.synchWeGroup();
return AjaxResult.success(WeConstans.SYNCH_TIP);
}
}