springfox.documentation.annotations.ApiIgnore Java Examples
The following examples show how to use
springfox.documentation.annotations.ApiIgnore.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("查询feature列表") @PostMapping(value = "/program") public ResponseEntity<PageInfo<FeatureCommonVO>> queryFeatureList(@ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "组织id", required = true) @RequestParam Long organizationId, @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issueId", direction = Sort.Direction.DESC) @ApiIgnore PageRequest pageRequest, @ApiParam(value = "搜索DTO", required = true) @RequestBody SearchVO searchVO) { return Optional.ofNullable(issueService.queryFeatureList(projectId, organizationId, pageRequest, searchVO)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.issue.queryFeatureList")); }
Example #2
Source File: OauthMenuController.java From zuihou-admin-boot with Apache License 2.0 | 6 votes |
@ApiImplicitParams({ @ApiImplicitParam(name = "group", value = "菜单组", dataType = "string", paramType = "query"), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "long", paramType = "query"), }) @ApiOperation(value = "查询用户可用的所有菜单路由树", notes = "查询用户可用的所有菜单路由树") @GetMapping("/router") public R<List<VueRouter>> myRouter(@RequestParam(value = "group", required = false) String group, @RequestParam(value = "userId", required = false) Long userId, @ApiIgnore @LoginUser SysUser sysUser) { if (userId == null || userId <= 0) { userId = sysUser.getId(); } List<Menu> list = menuService.findVisibleMenu(group, userId); List<VueRouter> treeList = dozer.mapList(list, VueRouter.class); return R.success(TreeUtil.buildTree(treeList)); }
Example #3
Source File: DashboardController.java From zuihou-admin-cloud with Apache License 2.0 | 6 votes |
/** * 最近10天访问记录 * * @return */ @GetMapping("/dashboard/visit") public R<Map<String, Object>> index(@ApiIgnore @LoginUser SysUser user) { Map<String, Object> data = new HashMap<>(); // 获取系统访问记录 data.put("totalVisitCount", loginLogService.findTotalVisitCount()); data.put("todayVisitCount", loginLogService.findTodayVisitCount()); data.put("todayIp", loginLogService.findTodayIp()); data.put("lastTenVisitCount", loginLogService.findLastTenDaysVisitCount(null)); data.put("lastTenUserVisitCount", loginLogService.findLastTenDaysVisitCount(user.getAccount())); data.put("browserCount", loginLogService.findByBrowser()); data.put("operatingSystemCount", loginLogService.findByOperatingSystem()); return R.success(data); }
Example #4
Source File: IssueLinkTypeController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("根据项目id查询issueLinkType") @PostMapping("/query_all") public ResponseEntity<PageInfo<IssueLinkTypeVO>> listIssueLinkType(@ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "不包含的issueLinkTypeId") @RequestParam(required = false) Long issueLinkTypeId, @ApiParam(value = "查询参数") @RequestBody IssueLinkTypeSearchVO issueLinkTypeSearchVO, @ApiParam(value = "分页信息", required = true) @SortDefault(value = "link_type_id", direction = Sort.Direction.DESC) @ApiIgnore PageRequest pageRequest) { return Optional.ofNullable(issueLinkTypeService.listIssueLinkType(projectId, issueLinkTypeId, issueLinkTypeSearchVO, pageRequest)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.IssueLinkType.listIssueLinkType")); }
Example #5
Source File: IssueComponentController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("根据project id查询component") @CustomPageRequest @PostMapping(value = "/query_all") public ResponseEntity<PageInfo<ComponentForListVO>> listByProjectId(@ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "当前模块id") @RequestParam(required = false) Long componentId, @ApiParam(value = "是否包含测试") @RequestParam(required = false, name = "no_issue_test", defaultValue = "false") Boolean noIssueTest, @ApiParam(value = "查询参数") @RequestBody(required = false) SearchVO searchVO, @ApiParam(value = "分页信息", required = true) @SortDefault(value = "component_id", direction = Sort.Direction.DESC) @ApiIgnore PageRequest pageRequest) { return Optional.ofNullable(issueComponentService.queryComponentByProjectId(projectId, componentId, noIssueTest, searchVO, pageRequest)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.componentList.get")); }
Example #6
Source File: SpaceController.java From steady with Apache License 2.0 | 6 votes |
/** * Checks whether a {@link Space} with the given token exists for the given {@link Tenant}. * * @param token a {@link java.lang.String} object. * @return 404 {@link HttpStatus#NOT_FOUND} if space with given token does not exist, 200 {@link HttpStatus#OK} if the space is found * @param tenant a {@link java.lang.String} object. */ @RequestMapping(value = "/{token:.+}", method = RequestMethod.OPTIONS) public ResponseEntity<Space> isSpaceExisting( @PathVariable String token, @ApiIgnore @RequestHeader(value=Constants.HTTP_TENANT_HEADER, required=false) String tenant) { // Check whether tenant exists or retrieve default Tenant t = null; try { t = this.tenantRepository.getTenant(tenant); } catch (Exception e){ log.error("Error retrieving tenant: " + e); return new ResponseEntity<Space>(HttpStatus.NOT_FOUND); } try { SpaceRepository.FILTER.findOne(this.spaceRepository.findBySecondaryKey(t.getTenantToken(), token)); return new ResponseEntity<Space>(HttpStatus.OK); } catch(EntityNotFoundException enfe) { return new ResponseEntity<Space>(HttpStatus.NOT_FOUND); } }
Example #7
Source File: SpaceController.java From steady with Apache License 2.0 | 6 votes |
/** * Returns all {@link Space}s of the given {@link Tenant}. * * @return 404 {@link HttpStatus#NOT_FOUND} if space with given token does not exist, 200 {@link HttpStatus#OK} if the space is found * @param tenant a {@link java.lang.String} object. */ @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<Collection<Space>> getAllSpaces( @ApiIgnore @RequestHeader(value=Constants.HTTP_TENANT_HEADER, required=false) String tenant) { // Check whether tenant exists or retrieve default Tenant t = null; try { t = this.tenantRepository.getTenant(tenant); } catch (Exception e){ log.error("Error retrieving tenant: " + e); return new ResponseEntity<Collection<Space>>(HttpStatus.NOT_FOUND); } try { // Get all its spaces final Collection<Space> all_tenant_spaces = this.spaceRepository.findAllTenantSpaces(t.getTenantToken(), true); return new ResponseEntity<Collection<Space>>(all_tenant_spaces, HttpStatus.OK); } catch(EntityNotFoundException enfe) { return new ResponseEntity<Collection<Space>>(HttpStatus.NOT_FOUND); } }
Example #8
Source File: SpaceController.java From steady with Apache License 2.0 | 6 votes |
/** * Returns a {@link Space} with the given token and the given {@link Tenant}. * * @param token a {@link java.lang.String} object. * @return 404 {@link HttpStatus#NOT_FOUND} if space with given token does not exist, 200 {@link HttpStatus#OK} if the space is found * @param tenant a {@link java.lang.String} object. */ @RequestMapping(value = "/{token:.+}", method = RequestMethod.GET) public ResponseEntity<Space> getSpace( @PathVariable String token, @ApiIgnore @RequestHeader(value=Constants.HTTP_TENANT_HEADER, required=false) String tenant) { // Check whether tenant exists or retrieve default Tenant t = null; try { t = this.tenantRepository.getTenant(tenant); } catch (Exception e){ log.error("Error retrieving tenant: " + e); return new ResponseEntity<Space>(HttpStatus.NOT_FOUND); } try { final Space s = SpaceRepository.FILTER.findOne(this.spaceRepository.findBySecondaryKey(t.getTenantToken(), token)); return new ResponseEntity<Space>(s, HttpStatus.OK); } catch(EntityNotFoundException enfe) { return new ResponseEntity<Space>(HttpStatus.NOT_FOUND); } }
Example #9
Source File: StateMachineSchemeController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.ORGANIZATION) @ApiOperation(value = "查询状态机方案列表") @CustomPageRequest @GetMapping public ResponseEntity<PageInfo<StateMachineSchemeVO>> pagingQuery(@ApiIgnore @SortDefault(value = "id", direction = Sort.Direction.DESC) PageRequest pageRequest, @PathVariable("organization_id") Long organizationId, @RequestParam(required = false) String name, @RequestParam(required = false) String description, @RequestParam(required = false) String[] param) { StateMachineSchemeVO schemeDTO = new StateMachineSchemeVO(); schemeDTO.setOrganizationId(organizationId); schemeDTO.setName(name); schemeDTO.setDescription(description); return new ResponseEntity<>(schemeService.pageQuery(organizationId, pageRequest, schemeDTO, ParamUtils.arrToStr(param)), HttpStatus.OK); }
Example #10
Source File: OauthMenuController.java From zuihou-admin-boot with Apache License 2.0 | 6 votes |
/** * 查询用户可用的所有资源 * * @param group 分组 <br> * @param userId 指定用户id * @return */ @ApiImplicitParams({ @ApiImplicitParam(name = "group", value = "菜单组", dataType = "string", paramType = "query"), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "long", paramType = "query"), }) @ApiOperation(value = "查询用户可用的所有菜单", notes = "查询用户可用的所有菜单") @GetMapping("/menus") public R<List<Menu>> myMenus(@RequestParam(value = "group", required = false) String group, @RequestParam(value = "userId", required = false) Long userId, @ApiIgnore @LoginUser SysUser sysUser) { if (userId == null || userId <= 0) { userId = sysUser.getId(); } List<Menu> list = menuService.findVisibleMenu(group, userId); List<Menu> tree = TreeUtil.buildTree(list); return R.success(tree); }
Example #11
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("分页搜索查询issue列表(包含子任务)") @CustomPageRequest @GetMapping(value = "/summary") public ResponseEntity<PageInfo<IssueNumVO>> queryIssueByOption(@ApiIgnore @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issueId", direction = Sort.Direction.DESC) PageRequest pageRequest, @ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "issueId") @RequestParam(required = false) Long issueId, @ApiParam(value = "issueNum") @RequestParam(required = false) String issueNum, @ApiParam(value = "only active sprint", required = true) @RequestParam Boolean onlyActiveSprint, @ApiParam(value = "是否包含自身", required = true) @RequestParam() Boolean self, @ApiParam(value = "搜索内容", required = false) @RequestParam(required = false) String content) { return Optional.ofNullable(issueService.queryIssueByOption(projectId, issueId, issueNum, onlyActiveSprint, self, content, pageRequest)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.Issue.queryIssueByOption")); }
Example #12
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("分页搜索查询issue列表") @CustomPageRequest @GetMapping(value = "/agile/summary") public ResponseEntity<PageInfo<IssueNumVO>> queryIssueByOptionForAgile(@ApiIgnore @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issueId", direction = Sort.Direction.DESC) PageRequest pageRequest, @ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "issueId") @RequestParam(required = false) Long issueId, @ApiParam(value = "issueNum") @RequestParam(required = false) String issueNum, @ApiParam(value = "是否包含自身", required = true) @RequestParam() Boolean self, @ApiParam(value = "搜索内容") @RequestParam(required = false) String content) { return Optional.ofNullable(issueService.queryIssueByOptionForAgile(projectId, issueId, issueNum, self, content, pageRequest)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.Issue.queryIssueByOptionForAgile")); }
Example #13
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("分页过滤查询issue列表提供给测试模块用") @CustomPageRequest @PostMapping(value = "/test_component/no_sub") public ResponseEntity<PageInfo<IssueListTestVO>> listIssueWithoutSubToTestComponent(@ApiIgnore @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issueId", direction = Sort.Direction.DESC) PageRequest pageRequest, @ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "组织id", required = true) @RequestParam Long organizationId, @ApiParam(value = "查询参数", required = true) @RequestBody(required = false) SearchVO searchVO) { return Optional.ofNullable(issueService.listIssueWithoutSubToTestComponent(projectId, searchVO, pageRequest, organizationId)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.Issue.listIssueWithoutSubToTestComponent")); }
Example #14
Source File: SpaceController.java From steady with Apache License 2.0 | 6 votes |
/** * Returns the default {@link Space} of the given {@link Tenant}. * * @return 404 {@link HttpStatus#NOT_FOUND} if no default space exists, 200 {@link HttpStatus#OK} if the space is found * @param tenant a {@link java.lang.String} object. */ @RequestMapping(value = "default", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<Space> getDefaultSpace( @ApiIgnore @RequestHeader(value=Constants.HTTP_TENANT_HEADER, required=false) String tenant) { // Check whether tenant exists or retrieve default Tenant t = null; try { t = this.tenantRepository.getTenant(tenant); } catch (Exception e){ log.error("Error retrieving tenant: " + e); return new ResponseEntity<Space>(HttpStatus.NOT_FOUND); } try { // Get default space final Space def = this.spaceRepository.findDefault(t.getTenantToken()); if(def==null) throw new EntityNotFoundException("No default space can be found for tenant [" + t.getTenantToken() + "]"); else return new ResponseEntity<Space>(def, HttpStatus.OK); } catch(EntityNotFoundException enfe) { return new ResponseEntity<Space>(HttpStatus.NOT_FOUND); } }
Example #15
Source File: AliPayController.java From yshopmall with Apache License 2.0 | 6 votes |
@ApiIgnore @GetMapping("/return") @AnonymousAccess @ApiOperation("支付之后跳转的链接") public ResponseEntity<String> returnPage(HttpServletRequest request, HttpServletResponse response){ AlipayConfig alipay = alipayService.find(); response.setContentType("text/html;charset=" + alipay.getCharset()); //内容验签,防止黑客篡改参数 if(alipayUtils.rsaCheck(request,alipay)){ //商户订单号 String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //支付宝交易号 String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); System.out.println("商户订单号"+outTradeNo+" "+"第三方交易号"+tradeNo); // 根据业务需要返回数据,这里统一返回OK return new ResponseEntity<>("payment successful",HttpStatus.OK); }else{ // 根据业务需要返回数据 return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } }
Example #16
Source File: AliPayController.java From yshopmall with Apache License 2.0 | 6 votes |
@ApiIgnore @RequestMapping("/notify") @AnonymousAccess @SuppressWarnings("all") @ApiOperation("支付异步通知(要公网访问),接收异步通知,检查通知内容app_id、out_trade_no、total_amount是否与请求中的一致,根据trade_status进行后续业务处理") public ResponseEntity<Object> notify(HttpServletRequest request){ AlipayConfig alipay = alipayService.find(); Map<String, String[]> parameterMap = request.getParameterMap(); //内容验签,防止黑客篡改参数 if (alipayUtils.rsaCheck(request,alipay)) { //交易状态 String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); // 商户订单号 String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //支付宝交易号 String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //付款金额 String totalAmount = new String(request.getParameter("total_amount").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //验证 if(tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue())||tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())){ // 验证通过后应该根据业务需要处理订单 } return new ResponseEntity<>(HttpStatus.OK); } return new ResponseEntity<>(HttpStatus.BAD_REQUEST); }
Example #17
Source File: TranslationSourceAPI.java From singleton with Eclipse Public License 2.0 | 6 votes |
/** * Create source with post data, especially it's used for creating long * source * */ @ApiIgnore @ApiOperation(value = APIOperation.SOURCE_TRANSLATION_POST_VALUE, notes = APIOperation.SOURCE_TRANSLATION_POST_NOTES) @RequestMapping(value = L10nI18nAPI.TRANSLATION_SOURCE_APIV1, method = RequestMethod.POST, produces = { API.API_CHARSET }) @ResponseBody @ResponseStatus(HttpStatus.OK) public SourceAPIResponseDTO postTranslationBySource( @PathVariable(APIParamName.PRODUCT_NAME) String productName, @RequestParam(value = APIParamName.VERSION) String version, @PathVariable(APIParamName.COMPONENT) String component, @RequestBody String source, @RequestParam(value = APIParamName.SOURCE_FORMAT, required = false) String sourceFormat, @RequestParam(value = APIParamName.LOCALE, required = false) String locale, @ApiParam(name = APIParamName.COLLECT_SOURCE, value = APIParamValue.COLLECT_SOURCE) @RequestParam(value = APIParamName.COLLECT_SOURCE, required = true, defaultValue = "true") String collectSource, //@ApiParam(name = APIParamName.PSEUDO, value = APIParamValue.PSEUDO) @RequestParam(value = APIParamName.PSEUDO, required = false, defaultValue = "false") String pseudo, HttpServletRequest request) throws L10nAPIException { String key = KeyUtils.generateKey(component, null, source.toString()); String newLocale = StringUtils.isEmpty(locale) ? ConstantsUnicode.EN : locale; StringSourceDTO sourceObj = SourceUtils.createSourceDTO(productName, version, component, newLocale, key, source, null, sourceFormat); boolean isSourceCached = sourceService.cacheSource(sourceObj); return SourceUtils.handleSourceResponse(isSourceCached); }
Example #18
Source File: TranslationCollectKeyAPI.java From singleton with Eclipse Public License 2.0 | 6 votes |
/** * Post a string key's source to l10n server */ @ApiIgnore @ApiOperation(value = APIOperation.KEY_SOURCE_POST_VALUE, notes = APIOperation.KEY_SOURCE_POST_NOTES) @RequestMapping(value = L10nI18nAPI.TRANSLATION_KEY_APIV1, method = RequestMethod.POST, produces = { API.API_CHARSET }) @ResponseStatus(HttpStatus.OK) public SourceAPIResponseDTO collectV1StringTranslation( @ApiParam(name = APIParamName.PRODUCT_NAME, required = true, value = APIParamValue.PRODUCT_NAME) @RequestParam(value = APIParamName.PRODUCT_NAME, required = true) String productName, @ApiParam(name = APIParamName.KEY, required = true, value = APIParamValue.KEY) @RequestParam(value = APIParamName.KEY, required = true) String key, @ApiParam(name = APIParamName.VERSION, required = true, value = APIParamValue.VERSION) @RequestParam(value = APIParamName.VERSION, required = true) String version, @ApiParam(name = APIParamName.COMPONENT, required = true, value = APIParamValue.COMPONENT) @RequestParam(value = APIParamName.COMPONENT, required = true) String component, @ApiParam(name = APIParamName.LOCALE, value = APIParamValue.LOCALE) @RequestParam(value = APIParamName.LOCALE, required = false) String locale, @ApiParam(name = APIParamName.SOURCE, required = false, value = APIParamValue.SOURCE) @RequestParam(value = APIParamName.SOURCE, required = false) String source, @ApiParam(name = APIParamName.COMMENT_SOURCE, value = APIParamValue.COMMENT_SOURCE) @RequestParam(value = APIParamName.COMMENT_SOURCE, required = false) String commentForSource, @ApiParam(name = APIParamName.SOURCE_FORMAT, value = APIParamValue.SOURCE_FORMAT) @RequestParam(value = APIParamName.SOURCE_FORMAT, required = false) String sourceFormat, @ApiParam(name = APIParamName.COLLECT_SOURCE, value = APIParamValue.COLLECT_SOURCE) @RequestParam(value = APIParamName.COLLECT_SOURCE, required = true, defaultValue = "true") String collectSource, //@ApiParam(name = APIParamName.PSEUDO, value = APIParamValue.PSEUDO) @RequestParam(value = APIParamName.PSEUDO, required = false, defaultValue = "false") String pseudo, HttpServletRequest request) throws L10nAPIException { String newLocale = StringUtils.isEmpty(locale) ? ConstantsUnicode.EN : locale; String newKey = StringUtils.isEmpty(sourceFormat) ? key : (key + ConstantsChar.DOT + ConstantsChar.POUND + sourceFormat.toUpperCase()); String newSource = source == null ? "" : source; StringSourceDTO sourceObj = SourceUtils.createSourceDTO(productName, version, component, newLocale, newKey, newSource, commentForSource, sourceFormat); boolean isSourceCached = sourceService.cacheSource(sourceObj); return SourceUtils.handleSourceResponse(isSourceCached); }
Example #19
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("分页过滤查询issue列表, 测试项目接口,过滤linked issue") @CustomPageRequest @PostMapping(value = "/test_component/filter_linked") public ResponseEntity<PageInfo<IssueListTestWithSprintVersionVO>> listIssueWithLinkedIssues(@ApiIgnore @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issueId", direction = Sort.Direction.DESC) PageRequest pageRequest, @ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "组织id", required = true) @RequestParam Long organizationId, @ApiParam(value = "查询参数", required = true) @RequestBody(required = false) SearchVO searchVO) { return Optional.ofNullable(issueService.listIssueWithLinkedIssues(projectId, searchVO, pageRequest, organizationId)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.Issue.listIssueWithBlockedIssues")); }
Example #20
Source File: ApplicationController.java From steady with Apache License 2.0 | 6 votes |
/** * <p>isApplicationExisting.</p> * * @return 404 {@link HttpStatus#NOT_FOUND} if application with given GAV does not exist, 200 {@link HttpStatus#OK} if the application is found * @param mvnGroup a {@link java.lang.String} object. * @param artifact a {@link java.lang.String} object. * @param version a {@link java.lang.String} object. * @param space a {@link java.lang.String} object. */ @RequestMapping(value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}", method = RequestMethod.OPTIONS) public ResponseEntity<Application> isApplicationExisting( @PathVariable String mvnGroup, @PathVariable String artifact, @PathVariable String version, @ApiIgnore @RequestHeader(value=Constants.HTTP_SPACE_HEADER, required=false) String space) { Space s = null; try { s = this.spaceRepository.getSpace(space); } catch (Exception e){ log.error("Error retrieving space: " + e); return new ResponseEntity<Application>(HttpStatus.NOT_FOUND); } try { ApplicationRepository.FILTER.findOne(this.appRepository.findByGAV(mvnGroup, artifact, version, s)); return new ResponseEntity<Application>(HttpStatus.OK); } catch(EntityNotFoundException enfe) { return new ResponseEntity<Application>(HttpStatus.NOT_FOUND); } }
Example #21
Source File: AuthorizationLoginController.java From singleton with Eclipse Public License 2.0 | 6 votes |
@PostMapping("/auth/login") @ApiImplicitParams({ @ApiImplicitParam(paramType = "form", dataType = "String", name = "username", required = true), @ApiImplicitParam(paramType = "form", dataType = "String", name = "password", required = true)} ) public String vipLogin(@ApiIgnore @ModelAttribute VipUser user ) throws ValidationException { String username = user.getUsername(); logger.info("{} begin to login", username ); logger.debug(user.getPassword()); String userId = ADAuthenticator.doLogin(user.getUsername(), user.getPassword(), authConfig.getLdapServerUri(), authConfig.getTdomain(), authConfig.getSearchbase()); if(userId != null) { String tokenJason = tokenService.createLoginToken(user.getUsername()); sqlService.createAuth(user.getUsername()); tokenJason = "{\"username\":\""+user.getUsername()+"\", \"authorization\":\""+tokenJason+"\"}"; logger.info("{} login successfully", username); return tokenJason; }else { logger.warn("{} login failure", username); throw new ValidationException(INVALID_LOGIN); } }
Example #22
Source File: TranslationSourceAPI.java From singleton with Eclipse Public License 2.0 | 6 votes |
/** * Provide translation based on String * * @param productName * The name of product. * @param component * The name of component. * @param version * The release version of product. * @param source * The English string that you want to translate. * @param locale * The name of locale. e.g: ja_JP, zh_CN. * @param request * Extends the ServletRequest interface to provide request information for HTTP servlets. * @return APIResponseDTO * The object which represents response status. */ @ApiIgnore @ApiOperation(value = APIOperation.SOURCE_TRANSLATION_GET_VALUE, notes = APIOperation.KEY_TRANSLATION_GET_NOTES) @RequestMapping(value = APIV2.SOURCE_TRANSLATION_GET, method = RequestMethod.GET, produces = { API.API_CHARSET }) public String getTranslationBySource( @PathVariable(APIParamName.PRODUCT_NAME) String productName, @PathVariable(APIParamName.COMPONENT) String component, @RequestParam(value = APIParamName.VERSION) String version, @RequestParam(value = APIParamName.LOCALE, required = false) String locale, @RequestParam(value = APIParamName.SOURCE, required = true) String source, @RequestParam(value = APIParamName.SOURCE_FORMAT, required = false) String sourceFormat, @ApiParam(name = APIParamName.COLLECT_SOURCE, value = APIParamValue.COLLECT_SOURCE) @RequestParam(value = APIParamName.COLLECT_SOURCE, required=false, defaultValue="false") String collectSource, @ApiParam(name = APIParamName.PSEUDO, value = APIParamValue.PSEUDO) @RequestParam(value = APIParamName.PSEUDO, required=false, defaultValue="false") String pseudo, HttpServletRequest request, HttpServletResponse response) { return super.getTranslationBySource(productName, component, version, locale, source, sourceFormat, collectSource, pseudo, request, response); }
Example #23
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("分页过滤查询issue列表(不包含子任务,包含详情),测试模块用") @CustomPageRequest @PostMapping(value = "/test_component/no_sub_detail") public ResponseEntity<PageInfo<IssueComponentDetailDTO>> listIssueWithoutSubDetail(@ApiIgnore @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issueId", direction = Sort.Direction.DESC) PageRequest pageRequest, @ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "查询参数", required = true) @RequestBody(required = false) SearchVO searchVO) { return Optional.ofNullable(issueService.listIssueWithoutSubDetail(projectId, searchVO, pageRequest)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.Issue.listIssueWithoutSubDetail")); }
Example #24
Source File: OauthMenuController.java From zuihou-admin-cloud with Apache License 2.0 | 6 votes |
/** * 查询用户可用的所有资源 * * @param group 分组 <br> * @param userId 指定用户id * @return */ @ApiImplicitParams({ @ApiImplicitParam(name = "group", value = "菜单组", dataType = "string", paramType = "query"), @ApiImplicitParam(name = "userId", value = "用户id", dataType = "long", paramType = "query"), }) @ApiOperation(value = "查询用户可用的所有菜单", notes = "查询用户可用的所有菜单") @GetMapping("/menus") public R<List<Menu>> myMenus(@RequestParam(value = "group", required = false) String group, @RequestParam(value = "userId", required = false) Long userId, @ApiIgnore @LoginUser SysUser sysUser) { if (userId == null || userId <= 0) { userId = sysUser.getId(); } List<Menu> list = menuService.findVisibleMenu(group, userId); List<Menu> tree = TreeUtil.buildTree(list); return R.success(tree); }
Example #25
Source File: SprintController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @CustomPageRequest @ApiOperation(value = "根据状态查已完成冲刺issue信息") @GetMapping(value = "/{sprintId}/issues") public ResponseEntity<PageInfo<IssueListVO>> queryIssueByOptions(@ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "冲刺id", required = true) @PathVariable Long sprintId, @ApiParam(value = "状态", required = true) @RequestParam String status, @ApiParam(value = "组织id", required = true) @RequestParam Long organizationId, @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issue_id", direction = Sort.Direction.DESC) @ApiIgnore PageRequest pageRequest) { return Optional.ofNullable(sprintService.queryIssueByOptions(projectId, sprintId, status, pageRequest, organizationId)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException(QUERY_ERROR)); }
Example #26
Source File: AliPayController.java From eladmin with Apache License 2.0 | 6 votes |
@ApiIgnore @AnonymousGetMapping("/return") @ApiOperation("支付之后跳转的链接") public ResponseEntity<String> returnPage(HttpServletRequest request, HttpServletResponse response) { AlipayConfig alipay = alipayService.find(); response.setContentType("text/html;charset=" + alipay.getCharset()); //内容验签,防止黑客篡改参数 if (alipayUtils.rsaCheck(request, alipay)) { //商户订单号 String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //支付宝交易号 String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); System.out.println("商户订单号" + outTradeNo + " " + "第三方交易号" + tradeNo); // 根据业务需要返回数据,这里统一返回OK return new ResponseEntity<>("payment successful", HttpStatus.OK); } else { // 根据业务需要返回数据 return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } }
Example #27
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 6 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("分页查询问题列表,包含子任务") @PostMapping(value = "/include_sub") public ResponseEntity<PageInfo<IssueListFieldKVVO>> listIssueWithSub(@ApiIgnore @ApiParam(value = "分页信息", required = true) @SortDefault(value = "issueId", direction = Sort.Direction.DESC) PageRequest pageRequest, @ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "查询参数", required = true) @RequestBody(required = false) SearchVO searchVO, @ApiParam(value = "查询参数", required = true) @RequestParam(required = false) Long organizationId) { return Optional.ofNullable(issueService.listIssueWithSub(projectId, searchVO, pageRequest, organizationId)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.Issue.listIssueWithSub")); }
Example #28
Source File: IssueController.java From agile-service-old with Apache License 2.0 | 5 votes |
@Permission(type = ResourceType.PROJECT, roles = {InitRoleCode.PROJECT_MEMBER, InitRoleCode.PROJECT_OWNER}) @ApiOperation("查询未分配的问题,类型为story,task,bug") @GetMapping(value = "/undistributed") public ResponseEntity<PageInfo<UndistributedIssueVO>> queryUnDistributedIssues(@ApiParam(value = "项目id", required = true) @PathVariable(name = "project_id") Long projectId, @ApiParam(value = "分页信息", required = true) @ApiIgnore PageRequest pageRequest) { return Optional.ofNullable(issueService.queryUnDistributedIssues(projectId, pageRequest)) .map(result -> new ResponseEntity<>(result, HttpStatus.OK)) .orElseThrow(() -> new CommonException("error.UndistributedIssueList.get")); }
Example #29
Source File: SysJob.java From RuoYi with Apache License 2.0 | 5 votes |
/** * 下次执行时间 * @return 下次执行时间 */ @ApiIgnore(value = "下次执行时间") public Date getNextValidTime(){ if (StrUtil.isNotEmpty(cronExpression)){ return CronUtils.getNextExecution(cronExpression); } return null; }
Example #30
Source File: OauthResourceController.java From zuihou-admin-cloud with Apache License 2.0 | 5 votes |
/** * 查询用户可用的所有资源 * * @param resource <br> * menuId 菜单 <br> * userId 当前登录人id * @return */ @ApiOperation(value = "查询用户可用的所有资源", notes = "查询用户可用的所有资源") @GetMapping("/visible") public R<List<String>> visible(ResourceQueryDTO resource, @ApiIgnore @LoginUser SysUser sysUser) { if (resource == null) { resource = new ResourceQueryDTO(); } if (resource.getUserId() == null) { resource.setUserId(sysUser.getId()); } List<Resource> list = resourceService.findVisibleResource(resource); return R.success(list.stream().filter(Objects::nonNull).map(Resource::getCode).collect(Collectors.toList())); }