test_class.declarator: mockMvc
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.declarator: tokenFactory
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private TokenFactory tokenFactory;
test_class.type: TokenFactory
test_class.var_name: tokenFactory
test_class.declarator: objectMapper
test_class.modifier: private
test_class.original_string: private ObjectMapper objectMapper;
test_class.type: ObjectMapper
test_class.var_name: objectMapper
test_class.declarator: accessToken
test_class.modifier: private
test_class.original_string: private OAuth2AccessToken accessToken;
test_class.type: OAuth2AccessToken
test_class.var_name: accessToken
test_class.file: lzpeng-boot-server/src/test/java/com/lzpeng/project/monitor/controller/JobControllerTest.java
test_class.identifier: JobControllerTest
test_case.body: @Test
      public void testSave() throws Exception {
          Job job = new Job();
          String content = objectMapper.writeValueAsString(job);
          String result = mockMvc.perform(post("/monitor/job")
                  .header(HttpHeaders.AUTHORIZATION, String.join(" ", accessToken.getTokenType(), accessToken.getValue()))
                  .content(content) // @RequestBody 解析
                  .contentType(MediaType.APPLICATION_JSON_UTF8) // @RequestBody 解
  //                .param("xxx", "xxx")// @RequestParam 解析
  //                .contentType(MediaType.APPLICATION_FORM_URLENCODED) // @RequestParam 解析
                  .accept(MediaType.APPLICATION_JSON_UTF8)) // 响应类型
                  .andExpect(status().isOk())
                  .andExpect(jsonPath("$.data.id").isNotEmpty())
                  .andReturn().getResponse().getContentAsString();
          log.info("{}",result);
      }
test_case.class_method_signature: JobControllerTest.testSave()
test_case.full_signature: @Test public void testSave()
test_case.identifier: testSave
test_case.invocations: writeValueAsString getContentAsString getResponse andReturn andExpect andExpect perform accept contentType content header post join getTokenType getValue isOk status isNotEmpty jsonPath info
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSave()
focal_class.declarator: MODULE_NAME = "monitor"
focal_class.modifier: private static final
focal_class.original_string: private static final String MODULE_NAME = "monitor";
focal_class.type: String
focal_class.var_name: MODULE_NAME
focal_class.declarator: CLASS_NAME = "job"
focal_class.modifier: private static final
focal_class.original_string: private static final String CLASS_NAME = "job";
focal_class.type: String
focal_class.var_name: CLASS_NAME
focal_class.declarator: LIST_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":list"
focal_class.modifier: private static final
focal_class.original_string: private static final String LIST_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":list";
focal_class.type: String
focal_class.var_name: LIST_PERM
focal_class.declarator: QUERY_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":query"
focal_class.modifier: private static final
focal_class.original_string: private static final String QUERY_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":query";
focal_class.type: String
focal_class.var_name: QUERY_PERM
focal_class.declarator: ADD_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":add"
focal_class.modifier: private static final
focal_class.original_string: private static final String ADD_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":add";
focal_class.type: String
focal_class.var_name: ADD_PERM
focal_class.declarator: DELETE_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":delete"
focal_class.modifier: private static final
focal_class.original_string: private static final String DELETE_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":delete";
focal_class.type: String
focal_class.var_name: DELETE_PERM
focal_class.declarator: EDIT_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":edit"
focal_class.modifier: private static final
focal_class.original_string: private static final String EDIT_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":edit";
focal_class.type: String
focal_class.var_name: EDIT_PERM
focal_class.declarator: EXPORT_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":export"
focal_class.modifier: private static final
focal_class.original_string: private static final String EXPORT_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":export";
focal_class.type: String
focal_class.var_name: EXPORT_PERM
focal_class.declarator: IMPORT_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":import"
focal_class.modifier: private static final
focal_class.original_string: private static final String IMPORT_PERM = MODULE_NAME + ":" +  CLASS_NAME + ":import";
focal_class.type: String
focal_class.var_name: IMPORT_PERM
focal_class.declarator: jobService
focal_class.modifier: protected
focal_class.original_string: protected JobService jobService;
focal_class.type: JobService
focal_class.var_name: jobService
focal_class.file: lzpeng-boot-server/src/main/java/com/lzpeng/project/monitor/controller/JobController.java
focal_class.identifier: JobController
focal_class.class_method_signature: JobController.setJobService(JobService jobService)
focal_class.full_signature: @Autowired public void setJobService(JobService jobService)
focal_class.identifier: setJobService
focal_class.modifiers: @Autowired public
focal_class.parameters: (JobService jobService)
focal_class.return: void
focal_class.signature: void setJobService(JobService jobService)
focal_class.class_method_signature: JobController.getTableInfo()
focal_class.full_signature: @Override @GetMapping("/dict") @ApiOperation("获取定时任务的数据字典") @PreAuthorize("hasAnyAuthority('" + LIST_PERM + "')") public Result<TableInfo> getTableInfo()
focal_class.identifier: getTableInfo
focal_class.modifiers: @Override @GetMapping("/dict") @ApiOperation("获取定时任务的数据字典") @PreAuthorize("hasAnyAuthority('" + LIST_PERM + "')") public
focal_class.parameters: ()
focal_class.return: Result<TableInfo>
focal_class.signature: Result<TableInfo> getTableInfo()
focal_class.class_method_signature: JobController.save(@Valid @RequestBody Job model)
focal_class.full_signature: @Override @PostMapping @ApiOperation("保存定时任务") @PreAuthorize("hasAnyAuthority('" + ADD_PERM + "')") public Result<Job> save(@Valid @RequestBody Job model)
focal_class.identifier: save
focal_class.modifiers: @Override @PostMapping @ApiOperation("保存定时任务") @PreAuthorize("hasAnyAuthority('" + ADD_PERM + "')") public
focal_class.parameters: (@Valid @RequestBody Job model)
focal_class.return: Result<Job>
focal_class.signature: Result<Job> save(@Valid @RequestBody Job model)
focal_class.class_method_signature: JobController.delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.full_signature: @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除定时任务") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") public Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.identifier: delete
focal_class.modifiers: @Override @DeleteMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("删除定时任务") @PreAuthorize("hasAnyAuthority('" + DELETE_PERM + "')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.return: Result<Void>
focal_class.signature: Result<Void> delete(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.class_method_signature: JobController.update(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id, @RequestBody Job model) {
focal_class.full_signature: @Override @PutMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("更新定时任务") @PreAuthorize("hasAnyAuthority('" + EDIT_PERM + "')") public Result<Job> update(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id, @RequestBody Job model) {
focal_class.identifier: update
focal_class.modifiers: @Override @PutMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("更新定时任务") @PreAuthorize("hasAnyAuthority('" + EDIT_PERM + "')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id, @RequestBody Job model) {
focal_class.return: Result<Job>
focal_class.signature: Result<Job> update(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id, @RequestBody Job model) {
focal_class.class_method_signature: JobController.findAll(Job model)
focal_class.full_signature: @Override @GetMapping @ApiOperation("查询所有定时任务") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public Result<List<Job>> findAll(Job model)
focal_class.identifier: findAll
focal_class.modifiers: @Override @GetMapping @ApiOperation("查询所有定时任务") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public
focal_class.parameters: (Job model)
focal_class.return: Result<List<Job>>
focal_class.signature: Result<List<Job>> findAll(Job model)
focal_class.class_method_signature: JobController.query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Job model) {
focal_class.full_signature: @Override @GetMapping("/{page:[0-9]+}/{size:[0-9]+}") @ApiOperation("分页查询定时任务列表") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public Result<QueryResult<Job>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Job model) {
focal_class.identifier: query
focal_class.modifiers: @Override @GetMapping("/{page:[0-9]+}/{size:[0-9]+}") @ApiOperation("分页查询定时任务列表") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public
focal_class.parameters: (@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Job model) {
focal_class.return: Result<QueryResult<Job>>
focal_class.signature: Result<QueryResult<Job>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Job model) {
focal_class.class_method_signature: JobController.findById(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.full_signature: @Override @GetMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("根据ID查询定时任务") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public Result<Job> findById(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.identifier: findById
focal_class.modifiers: @Override @GetMapping("/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("根据ID查询定时任务") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.return: Result<Job>
focal_class.signature: Result<Job> findById(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.class_method_signature: JobController.batch(@RequestBody BatchModel<Job> batch)
focal_class.full_signature: @Override @PostMapping("/batch") @ApiOperation("批量操作定时任务") @PreAuthorize("hasAuthority('" + ADD_PERM +"') and hasAuthority('" + EDIT_PERM +"') and hasAuthority('" + DELETE_PERM +"')") public Result batch(@RequestBody BatchModel<Job> batch)
focal_class.identifier: batch
focal_class.modifiers: @Override @PostMapping("/batch") @ApiOperation("批量操作定时任务") @PreAuthorize("hasAuthority('" + ADD_PERM +"') and hasAuthority('" + EDIT_PERM +"') and hasAuthority('" + DELETE_PERM +"')") public
focal_class.parameters: (@RequestBody BatchModel<Job> batch)
focal_class.return: Result
focal_class.signature: Result batch(@RequestBody BatchModel<Job> batch)
focal_class.class_method_signature: JobController.execute(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.full_signature: @PostMapping("/execute/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("立即执行定时任务") @PreAuthorize("hasRole('ADMIN')") public Result<String> execute(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.identifier: execute
focal_class.modifiers: @PostMapping("/execute/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("立即执行定时任务") @PreAuthorize("hasRole('ADMIN')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.return: Result<String>
focal_class.signature: Result<String> execute(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.class_method_signature: JobController.pause(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.full_signature: @PostMapping("/pause/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("暂停定时任务") @PreAuthorize("hasRole('ADMIN')") public Result<String> pause(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.identifier: pause
focal_class.modifiers: @PostMapping("/pause/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("暂停定时任务") @PreAuthorize("hasRole('ADMIN')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.return: Result<String>
focal_class.signature: Result<String> pause(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.class_method_signature: JobController.stop(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.full_signature: @PostMapping("/stop/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("停止定时任务") @PreAuthorize("hasRole('ADMIN')") public Result<String> stop(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.identifier: stop
focal_class.modifiers: @PostMapping("/stop/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("停止定时任务") @PreAuthorize("hasRole('ADMIN')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.return: Result<String>
focal_class.signature: Result<String> stop(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.class_method_signature: JobController.resume(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.full_signature: @PostMapping("/resume/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("恢复定时任务") @PreAuthorize("hasRole('ADMIN')") public Result<String> resume(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.identifier: resume
focal_class.modifiers: @PostMapping("/resume/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("恢复定时任务") @PreAuthorize("hasRole('ADMIN')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.return: Result<String>
focal_class.signature: Result<String> resume(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.class_method_signature: JobController.start(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.full_signature: @PostMapping("/start/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("开启定时任务") @PreAuthorize("hasRole('ADMIN')") public Result<String> start(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.identifier: start
focal_class.modifiers: @PostMapping("/start/{id:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("开启定时任务") @PreAuthorize("hasRole('ADMIN')") public
focal_class.parameters: (@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.return: Result<String>
focal_class.signature: Result<String> start(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) thr
focal_class.class_method_signature: JobController.importData(MultipartFile file)
focal_class.full_signature: @Override @PostMapping("/import") @ApiOperation("从文件导入定时任务") @PreAuthorize("hasAnyAuthority('" + IMPORT_PERM + "')") public Result<List<Job>> importData(MultipartFile file)
focal_class.identifier: importData
focal_class.modifiers: @Override @PostMapping("/import") @ApiOperation("从文件导入定时任务") @PreAuthorize("hasAnyAuthority('" + IMPORT_PERM + "')") public
focal_class.parameters: (MultipartFile file)
focal_class.return: Result<List<Job>>
focal_class.signature: Result<List<Job>> importData(MultipartFile file)
focal_class.class_method_signature: JobController.exportData(@RequestBody(required = false) List<String> ids, HttpServletResponse response)
focal_class.full_signature: @Override @GetMapping("/export") @ApiOperation("导出定时任务到文件") @PreAuthorize("permitAll()") public void exportData(@RequestBody(required = false) List<String> ids, HttpServletResponse response)
focal_class.identifier: exportData
focal_class.modifiers: @Override @GetMapping("/export") @ApiOperation("导出定时任务到文件") @PreAuthorize("permitAll()") public
focal_class.parameters: (@RequestBody(required = false) List<String> ids, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void exportData(@RequestBody(required = false) List<String> ids, HttpServletResponse response)
focal_class.superclass: extends BaseControllerImpl<Job>
focal_method.body: @Override
      @PostMapping
      @ApiOperation("保存定时任务")
      @PreAuthorize("hasAnyAuthority('" + ADD_PERM + "')")
      public Result<Job> save(@Valid @RequestBody Job model) {
          return super.save(model);
      }
focal_method.class_method_signature: JobController.save(@Valid @RequestBody Job model)
focal_method.full_signature: @Override @PostMapping @ApiOperation("保存定时任务") @PreAuthorize("hasAnyAuthority('" + ADD_PERM + "')") public Result<Job> save(@Valid @RequestBody Job model)
focal_method.identifier: save
focal_method.invocations: save
focal_method.modifiers: @Override @PostMapping @ApiOperation("保存定时任务") @PreAuthorize("hasAnyAuthority('" + ADD_PERM + "')") public
focal_method.parameters: (@Valid @RequestBody Job model)
focal_method.return: Result<Job>
focal_method.signature: Result<Job> save(@Valid @RequestBody Job model)