@Test public void addProblems() { }
public ResponseEntity<BasicResponse> addProblems(@ApiParam(value = "") @Valid @RequestBody ProblemInfo body) { String accept = request.getHeader("Accept"); if (accept != null && accept.contains("application/json")) { BasicResponse basicResponse = new BasicResponse(); try { ArrayList<Long> longs = problemService.addProblemByProblemInfo(body); basicResponse.setData(longs); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.NOT_IMPLEMENTED); } catch (ProblemServiceImpl.ProblemServiceException e) { basicResponse.setCode("error"); basicResponse.setData(e.getMessage()); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.BAD_REQUEST); } catch (Exception e) { e.printStackTrace(); basicResponse.setCode("error"); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.INTERNAL_SERVER_ERROR); } } return new ResponseEntity<BasicResponse>(HttpStatus.NOT_IMPLEMENTED); }
ProblemsApiController implements ProblemsApi { public ResponseEntity<BasicResponse> addProblems(@ApiParam(value = "") @Valid @RequestBody ProblemInfo body) { String accept = request.getHeader("Accept"); if (accept != null && accept.contains("application/json")) { BasicResponse basicResponse = new BasicResponse(); try { ArrayList<Long> longs = problemService.addProblemByProblemInfo(body); basicResponse.setData(longs); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.NOT_IMPLEMENTED); } catch (ProblemServiceImpl.ProblemServiceException e) { basicResponse.setCode("error"); basicResponse.setData(e.getMessage()); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.BAD_REQUEST); } catch (Exception e) { e.printStackTrace(); basicResponse.setCode("error"); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.INTERNAL_SERVER_ERROR); } } return new ResponseEntity<BasicResponse>(HttpStatus.NOT_IMPLEMENTED); } }
ProblemsApiController implements ProblemsApi { public ResponseEntity<BasicResponse> addProblems(@ApiParam(value = "") @Valid @RequestBody ProblemInfo body) { String accept = request.getHeader("Accept"); if (accept != null && accept.contains("application/json")) { BasicResponse basicResponse = new BasicResponse(); try { ArrayList<Long> longs = problemService.addProblemByProblemInfo(body); basicResponse.setData(longs); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.NOT_IMPLEMENTED); } catch (ProblemServiceImpl.ProblemServiceException e) { basicResponse.setCode("error"); basicResponse.setData(e.getMessage()); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.BAD_REQUEST); } catch (Exception e) { e.printStackTrace(); basicResponse.setCode("error"); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.INTERNAL_SERVER_ERROR); } } return new ResponseEntity<BasicResponse>(HttpStatus.NOT_IMPLEMENTED); } @org.springframework.beans.factory.annotation.Autowired  ProblemsApiController(ObjectMapper objectMapper, HttpServletRequest request); }
ProblemsApiController implements ProblemsApi { public ResponseEntity<BasicResponse> addProblems(@ApiParam(value = "") @Valid @RequestBody ProblemInfo body) { String accept = request.getHeader("Accept"); if (accept != null && accept.contains("application/json")) { BasicResponse basicResponse = new BasicResponse(); try { ArrayList<Long> longs = problemService.addProblemByProblemInfo(body); basicResponse.setData(longs); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.NOT_IMPLEMENTED); } catch (ProblemServiceImpl.ProblemServiceException e) { basicResponse.setCode("error"); basicResponse.setData(e.getMessage()); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.BAD_REQUEST); } catch (Exception e) { e.printStackTrace(); basicResponse.setCode("error"); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.INTERNAL_SERVER_ERROR); } } return new ResponseEntity<BasicResponse>(HttpStatus.NOT_IMPLEMENTED); } @org.springframework.beans.factory.annotation.Autowired  ProblemsApiController(ObjectMapper objectMapper, HttpServletRequest request); ResponseEntity<BasicResponse> addProblems(@ApiParam(value = "") @Valid @RequestBody ProblemInfo body); ResponseEntity<BasicResponse> problemsDelete(@ApiParam(value = "题库id", required = true) @RequestHeader(value = "X-tiku-poolId", required = true) UUID xTikuPoolId, @ApiParam(value = "授权码", required = true) @RequestHeader(value = "X-tiku-token", required = true) UUID xTikuToken, @NotNull @ApiParam(value = "待删除的问题", required = true) @Valid @RequestParam(value = "problemId", required = true) String problemId) {; }
ProblemsApiController implements ProblemsApi { public ResponseEntity<BasicResponse> addProblems(@ApiParam(value = "") @Valid @RequestBody ProblemInfo body) { String accept = request.getHeader("Accept"); if (accept != null && accept.contains("application/json")) { BasicResponse basicResponse = new BasicResponse(); try { ArrayList<Long> longs = problemService.addProblemByProblemInfo(body); basicResponse.setData(longs); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.NOT_IMPLEMENTED); } catch (ProblemServiceImpl.ProblemServiceException e) { basicResponse.setCode("error"); basicResponse.setData(e.getMessage()); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.BAD_REQUEST); } catch (Exception e) { e.printStackTrace(); basicResponse.setCode("error"); return new ResponseEntity<BasicResponse>(basicResponse, HttpStatus.INTERNAL_SERVER_ERROR); } } return new ResponseEntity<BasicResponse>(HttpStatus.NOT_IMPLEMENTED); } @org.springframework.beans.factory.annotation.Autowired  ProblemsApiController(ObjectMapper objectMapper, HttpServletRequest request); ResponseEntity<BasicResponse> addProblems(@ApiParam(value = "") @Valid @RequestBody ProblemInfo body); ResponseEntity<BasicResponse> problemsDelete(@ApiParam(value = "题库id", required = true) @RequestHeader(value = "X-tiku-poolId", required = true) UUID xTikuPoolId, @ApiParam(value = "授权码", required = true) @RequestHeader(value = "X-tiku-token", required = true) UUID xTikuToken, @NotNull @ApiParam(value = "待删除的问题", required = true) @Valid @RequestParam(value = "problemId", required = true) String problemId) {;  }