@CrossOrigin
@RequestMapping(value = "/user/{id}", method = RequestMethod.GET)
@ApiOperation(value = "Find organizations by user id", notes = "Returns a collection of organizations")
@ApiResponses(value = { @ApiResponse(code = 404, message = "ID of user invalid") })
public List<OrganizationDTO> getOrganizationsByUser(
@ApiParam(value = "userId of organizations to return", required = true) @PathVariable("id") Integer id) {
System.out.println("************** OrganizationController.getOrganizationsByUser()"
+ ": id=" + id
+ " **************");
List<OrganizationDTO> organizations = null;
try {
organizations = organizationService.findByUser(id);
} catch (Exception e) {
throw new NotFoundException("ID of user invalid");
}
return organizations;
}
OrganizationController.java 文件源码
java
阅读 49
收藏 0
点赞 0
评论 0
项目:c4sg-services
作者:
评论列表
文章目录