ITeam.java
2.88 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package com.dituhui.mp.user;
import com.dituhui.mp.pojo.RoleInfo;
import com.dituhui.mp.pojo.TeamInfo;
import com.dituhui.mp.pojo.UserInfo;
import com.dituhui.mp.pojo.WebResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 团队相关接口
* @author zl
*/
@FeignClient(value = "user")
public interface ITeam {
/**
* 根据ID获取团队
* @param teamId 团队ID
* @return WebResult
*/
@RequestMapping(value = "/v1/team/get", method = RequestMethod.GET)
WebResult<TeamInfo> queryById(@RequestParam("id") String teamId);
/**
* 根据ak获取团队
*
* @param ak 团队ak
* @return WebResult
*/
@RequestMapping(value = "/v1/team/queryByAppKey", method = RequestMethod.GET)
WebResult<TeamInfo> queryByAppKey(@RequestParam("ak") String ak);
/**
* 添加团队
* @param teamInfo 团队相关信息
* @return WebResult
*/
@RequestMapping(value = "/v1/team/add", method = RequestMethod.POST)
WebResult<TeamInfo> addTeam(@RequestBody TeamInfo teamInfo);
/**
* 更新团队
* @param teamInfo 团队相关信息
* @return WebResult
*/
@RequestMapping(value = "/v1/team/update", method = RequestMethod.POST)
WebResult<TeamInfo> updateTeam(@RequestBody TeamInfo teamInfo);
/**
* 根据Id删除团队
* @param teamId 团队ID
* @return WebResult
*/
@RequestMapping(value = "/v1/team/delete", method = RequestMethod.POST)
WebResult<Boolean> deleteTeam(@RequestParam("id") String teamId);
/**
* 添加团队用户
* @param teamId 团队ID
* @param userId 用户ID
* @return
*/
@RequestMapping(value = "/v1/team/addUser", method = RequestMethod.POST)
WebResult<Boolean> addTeamUser(@RequestParam("id") String teamId, @RequestParam("userId") String userId);
/**
* 删除团队用户
* @param teamId 团队ID
* @param userId 用户ID
* @return
*/
@RequestMapping(value = "/v1/team/deleteUser",method = RequestMethod.POST)
WebResult<Boolean> deleteTeamUser(@RequestParam("id") String teamId, @RequestParam("userId") String userId);
/**
* 获取团队用户
* @param teamId 团队ID
* @return
*/
@RequestMapping(value = "/v1/team/getUsers", method = RequestMethod.GET)
WebResult<List<UserInfo>> getTeamUser(@RequestParam("teamId") String teamId);
/**
* 获取团队角色
* @param teamId 团队ID
* @return
*/
@RequestMapping(value = "/v1/team/getRoles", method = RequestMethod.GET)
WebResult<List<RoleInfo>> getTeamRole(@RequestParam("teamId") String teamId);
}