Commit a6e711c7ae8b867d20e1c617daf122e20bf1d674
1 parent
946fae278a
Exists in
master
and in
6 other branches
删除最后一次顿号
Showing 1 changed file with 24 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
a6e711c
... | ... | @@ -10,6 +10,7 @@ |
10 | 10 | import com.lyms.platform.common.constants.ConstantInterface; |
11 | 11 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
12 | 12 | import com.lyms.platform.common.enums.*; |
13 | +import com.lyms.platform.common.result.BaseListResponse; | |
13 | 14 | import com.lyms.platform.common.utils.*; |
14 | 15 | import com.lyms.platform.operate.web.facade.AccessPermissionFacade; |
15 | 16 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
... | ... | @@ -184,6 +185,29 @@ |
184 | 185 | } |
185 | 186 | return map; |
186 | 187 | } |
188 | + | |
189 | + | |
190 | + | |
191 | + @RequestMapping(value = "/usersbyorg", method = RequestMethod.GET) | |
192 | + @TokenRequired | |
193 | + @ResponseBody | |
194 | + public BaseListResponse getUsers(@RequestParam(value = "orgId", required = false) String orgId){ | |
195 | + UsersQuery usersQuery = new UsersQuery(); | |
196 | + | |
197 | + usersQuery.setYn(YnEnums.YES.getId()); | |
198 | + usersQuery.setType(1); | |
199 | + | |
200 | + List<Users> usersList = usersService.queryUsers(usersQuery); | |
201 | + List data = new ArrayList(); | |
202 | + for(Users users1:usersList){ | |
203 | + Map map = new HashMap(); | |
204 | + map.put("id",users1.getId()); | |
205 | + map.put("name",users1.getName()); | |
206 | + data.add(map); | |
207 | + } | |
208 | + return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(data); | |
209 | + } | |
210 | + | |
187 | 211 | |
188 | 212 | /** |
189 | 213 | * 获取用户列表 |