UserRelController.java
10.5 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
package com.hotent.uc.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
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 org.springframework.web.bind.annotation.RestController;
import com.hotent.base.controller.BaseController;
import com.hotent.base.feign.PortalFeignService;
import com.hotent.base.model.CommonResult;
import com.hotent.base.query.PageList;
import com.hotent.base.query.QueryFilter;
import com.hotent.uc.exception.BaseException;
import com.hotent.uc.model.UserRel;
import com.hotent.uc.params.user.UserRelFilterObject;
import com.hotent.uc.params.user.UserRelVo;
import com.hotent.uc.params.user.UserVo;
/**
* 用户关系汇报线模块接口
* @author zhangxw
*
*/
@RestController
@RequestMapping("/api/userRel/v1/")
@Api(tags="UserRelController")
public class UserRelController extends BaseController {
@Autowired
PortalFeignService portalFeignService;
/**
* 查询用户关系定义
* @param filter
* @return
* @throws Exception
*/
@RequestMapping(value="userRels/getUserRelPage",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "获取用户关系定义列表(带分页信息)", httpMethod = "POST", notes = "获取用户关系定义列表")
public PageList<UserRel> getUserRelPage(@ApiParam(name = "filter", value = "查询参数", required = true) @RequestBody QueryFilter filter) throws Exception{
// return userRelService.query(filter);
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 查询用户关系定义
* @param filter
* @return
* @throws Exception
*/
@RequestMapping(value="userRels/getUserRelByTypeId",method=RequestMethod.GET, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "根据汇报线分类编码获取下属的所有汇报线", httpMethod = "GET", notes = "根据汇报线分类编码获取下属的所有汇报线")
public List<UserRel> getUserRelByTypeId(@ApiParam(name = "typeId", value = "分类Id", required = true) @RequestParam String typeId) throws Exception{
// List<UserRel> list = userRelService.getUserRelByTypeId(typeId);
// List<UserRel> rtnList = BeanUtils.listToTree(list);
// return rtnList;
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 查询用户关系定义
* @param filter
* @return
* @throws Exception
*/
@RequestMapping(value="userRels/getChildRelByAilas",method=RequestMethod.GET, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "根据汇报线别名获取其直接子节点", httpMethod = "GET", notes = "根据汇报线别名获取其直接子节点")
public PageList<UserRel> getChildRelByAilas(@ApiParam(name = "alias", value = "查询参数", required = true) @RequestParam String alias) throws Exception{
// return userRelService.getChildRelByAilas(alias);
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 添加用户关系定义
* @param userRelVo
* @return
* @throws Exception
*
*/
@RequestMapping(value="userRel/addUserRel",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "添加用户关系定义", httpMethod = "POST", notes = "添加用户关系定义")
public CommonResult<String> addUserRel(@ApiParam(name="userRelVo",value="用户关系定义参数对象", required = true) @RequestBody List<UserRelVo> userRelVo) throws Exception{
// return userRelService.addUserRel(userRelVo);
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 根据用户关系定义编码删除用户关系定义
* @param code
* @return
* @throws Exception
*/
@RequestMapping(value="userRel/deleteUserRel",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "根据用户关系定义编码删除用户关系定义", httpMethod = "POST", notes = "根据用户关系定义编码删除用户关系定义")
public CommonResult<String> deleteUserRel(@ApiParam(name="codes",value="用户关系定义编码", required = true) @RequestBody String codes) throws Exception{
// return userRelService.deleteUserRel(codes);
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 更新用户关系定义
* @param userRelVo
* @return
* @throws Exception
*/
@RequestMapping(value="userRel/updateUserRel",method=RequestMethod.PUT, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "更新用户关系定义", httpMethod = "PUT", notes = "更新用户关系定义")
public CommonResult<String> updateUserRel(@ApiParam(name="userRelVo",value="用户关系定义参数对象", required = true) @RequestBody UserRelVo userRelVo) throws Exception{
// return userRelService.updateUserRel(userRelVo);
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 获取用户关系定义信息
* @param code
* @return
* @throws Exception
*/
@RequestMapping(value="userRel/getUserRel",method=RequestMethod.GET, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "根据用户关系定义别名获取用户关系定义信息", httpMethod = "GET", notes = "获取用户关系定义信息")
public UserRel getUserRel(@ApiParam(name="alias",value="用户关系定义别名", required = true) @RequestParam String alias) throws Exception{
//return userRelService.getByAlias(alias);
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 获取直接上级用户
* @param userRelFilterObject
* @return
* @throws Exception
*
*/
@RequestMapping(value="userRel/getSuperUser",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "获取直接上级用户", httpMethod = "POST", notes = "获取直接上级用户")
public List<UserVo> getSuperUser(@ApiParam(name="userRelFilterObject",value="用户关系定义编码", required = true) @RequestBody UserRelFilterObject userRelFilterObject) throws Exception{
/*String typeId = userRelService.getRelTypeId(userRelFilterObject);
List<User> users = userRelService.getSuperUser(userRelFilterObject.getAccount() , typeId);
return OrgUtil.convertToUserVoList(users);*/
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 获取所有上级用户
* @param userRelFilterObject
* @return
* @throws Exception
*
*/
@RequestMapping(value="userRel/getAllSuperUser",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "获取所有上级用户", httpMethod = "POST", notes = "获取所有上级用户")
public List<UserVo> getAllSuperUser(@ApiParam(name="userRelFilterObject",value="用户关系定义编码", required = true) @RequestBody UserRelFilterObject userRelFilterObject) throws Exception{
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 获取直接下级用户
* @param userRelFilterObject
* @return
* @throws Exception
*
*/
@RequestMapping(value="userRel/getLowerUser",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "获取直接下级用户", httpMethod = "POST", notes = "获取直接下级用户")
public List<UserVo> getLowerUser(@ApiParam(name="userRelFilterObject",value="用户关系定义编码", required = true) @RequestBody UserRelFilterObject userRelFilterObject) throws Exception{
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 获取所有下级用户
* @param userRelFilterObject
* @return
* @throws Exception
*
*/
@RequestMapping(value="userRel/getAllLowerUser",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "获取所有下级用户", httpMethod = "POST", notes = "获取所有下级用户")
public List<UserVo> getAllLowerUser(@ApiParam(name="userRelFilterObject",value="用户关系定义编码", required = true) @RequestBody UserRelFilterObject userRelFilterObject) throws Exception{
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 物理删除所有逻辑删除了的用户关系汇报线数据
* @return
* @throws Exception
*/
@RequestMapping(value="userRel/deleteUserRelPhysical",method=RequestMethod.DELETE, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "物理删除所有逻辑删除了的用户关系汇报线数据", httpMethod = "DELETE", notes = "物理删除所有逻辑删除了的用户关系汇报线数据")
public CommonResult<Integer> deleteUserRelPhysical() throws Exception{
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 根据时间获取汇报线节点数据(数据同步)
* @param btime
* @param etime
* @return
* @throws Exception
*/
@RequestMapping(value="userRels/getUserRelByTime",method=RequestMethod.GET, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "根据时间获取汇报线节点数据(数据同步)", httpMethod = "GET", notes = "根据时间获取汇报线节点数据(数据同步)")
public List<UserRel> getUserRelByTime(@ApiParam(name="btime",value="开始时间(格式:2018-01-01 12:00:00或2018-01-01)") @RequestParam(required=false) String btime,@ApiParam(name="etime",value="结束时间(格式:2018-02-01 12:00:00或2018-02-01)") @RequestParam(required=false) String etime) throws Exception{
throw new BaseException("uc-demo模块不需要实现该接口");
}
/**
* 更新汇报线节点所在树的位置
* @param request
* @param response
* @throws Exception void
* @exception
*/
@RequestMapping(value="userRels/updateRelPos",method=RequestMethod.POST, produces = {
"application/json; charset=utf-8" })
@ApiOperation(value = "更新汇报线节点所在树的位置", httpMethod = "POST", notes = "更新汇报线节点所在树的位置(树结构拖动保存)")
public CommonResult<String> updateRelPos(@ApiParam(name="relId",value="移动节点id", required = true) @RequestParam String relId,@ApiParam(name="parentId",value="移至(目标)节点id", required = true) @RequestParam String parentId) throws Exception {
throw new BaseException("uc-demo模块不需要实现该接口");
}
}