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: objectMapper
test_class.modifier: private
test_class.original_string: private ObjectMapper objectMapper;
test_class.type: ObjectMapper
test_class.var_name: objectMapper
test_class.declarator: TEST_USER = "test-user"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_USER = "test-user";
test_class.type: String
test_class.var_name: TEST_USER
test_class.declarator: MODULE_NAME = "sys"
test_class.modifier: private static final
test_class.original_string: private static final String MODULE_NAME = "sys";
test_class.type: String
test_class.var_name: MODULE_NAME
test_class.declarator: CLASS_NAME = "notice"
test_class.modifier: private static final
test_class.original_string: private static final String CLASS_NAME = "notice";
test_class.type: String
test_class.var_name: CLASS_NAME
test_class.declarator: LIST_PERM = MODULE_NAME + ":" + CLASS_NAME + ":list"
test_class.modifier: private static final
test_class.original_string: private static final String LIST_PERM = MODULE_NAME + ":" + CLASS_NAME + ":list";
test_class.type: String
test_class.var_name: LIST_PERM
test_class.declarator: QUERY_PERM = MODULE_NAME + ":" + CLASS_NAME + ":query"
test_class.modifier: private static final
test_class.original_string: private static final String QUERY_PERM = MODULE_NAME + ":" + CLASS_NAME + ":query";
test_class.type: String
test_class.var_name: QUERY_PERM
test_class.declarator: ADD_PERM = MODULE_NAME + ":" + CLASS_NAME + ":add"
test_class.modifier: private static final
test_class.original_string: private static final String ADD_PERM = MODULE_NAME + ":" + CLASS_NAME + ":add";
test_class.type: String
test_class.var_name: ADD_PERM
test_class.declarator: DELETE_PERM = MODULE_NAME + ":" + CLASS_NAME + ":delete"
test_class.modifier: private static final
test_class.original_string: private static final String DELETE_PERM = MODULE_NAME + ":" + CLASS_NAME + ":delete";
test_class.type: String
test_class.var_name: DELETE_PERM
test_class.declarator: EDIT_PERM = MODULE_NAME + ":" + CLASS_NAME + ":edit"
test_class.modifier: private static final
test_class.original_string: private static final String EDIT_PERM = MODULE_NAME + ":" + CLASS_NAME + ":edit";
test_class.type: String
test_class.var_name: EDIT_PERM
test_class.declarator: EXPORT_PERM = MODULE_NAME + ":" + CLASS_NAME + ":export"
test_class.modifier: private static final
test_class.original_string: private static final String EXPORT_PERM = MODULE_NAME + ":" + CLASS_NAME + ":export";
test_class.type: String
test_class.var_name: EXPORT_PERM
test_class.declarator: IMPORT_PERM = MODULE_NAME + ":" + CLASS_NAME + ":import"
test_class.modifier: private static final
test_class.original_string: private static final String IMPORT_PERM = MODULE_NAME + ":" + CLASS_NAME + ":import";
test_class.type: String
test_class.var_name: IMPORT_PERM
test_class.file: lzpeng-boot-server/src/test/java/com/lzpeng/project/sys/controller/NoticeControllerTest.java
test_class.identifier: NoticeControllerTest
test_case.body: @Test
      @WithMockUser(username = TEST_USER, authorities = QUERY_PERM)
      public void testQuery() throws Exception {
          int page = 1;
          int size = 10;
          Notice notice = new Notice();
          String content = objectMapper.writeValueAsString(notice);
          String result = mockMvc.perform(get("/sys/notice/" + page + "/" + size)
                  .content(content)
                  .contentType(MediaType.APPLICATION_JSON_UTF8) // 请求类型
                  .accept(MediaType.APPLICATION_JSON_UTF8)) // 响应类型
                  .andExpect(status().isOk())
                  .andExpect(jsonPath("$.data.total").isNumber())
                  .andReturn().getResponse().getContentAsString();
          log.info(result);
      }
test_case.class_method_signature: NoticeControllerTest.testQuery()
test_case.full_signature: @Test @WithMockUser(username = TEST_USER, authorities = QUERY_PERM) public void testQuery()
test_case.identifier: testQuery
test_case.invocations: writeValueAsString getContentAsString getResponse andReturn andExpect andExpect perform accept contentType content get isOk status isNumber jsonPath info
test_case.modifiers: @Test @WithMockUser(username = TEST_USER, authorities = QUERY_PERM) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testQuery()
focal_class.declarator: MODULE_NAME = "sys"
focal_class.modifier: private static final
focal_class.original_string: private static final String MODULE_NAME = "sys";
focal_class.type: String
focal_class.var_name: MODULE_NAME
focal_class.declarator: CLASS_NAME = "notice"
focal_class.modifier: private static final
focal_class.original_string: private static final String CLASS_NAME = "notice";
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: noticeService
focal_class.modifier: private
focal_class.original_string: private NoticeService noticeService;
focal_class.type: NoticeService
focal_class.var_name: noticeService
focal_class.file: lzpeng-boot-server/src/main/java/com/lzpeng/project/sys/controller/NoticeController.java
focal_class.identifier: NoticeController
focal_class.class_method_signature: NoticeController.setNoticeService(NoticeService noticeService)
focal_class.full_signature: @Autowired public void setNoticeService(NoticeService noticeService)
focal_class.identifier: setNoticeService
focal_class.modifiers: @Autowired public
focal_class.parameters: (NoticeService noticeService)
focal_class.return: void
focal_class.signature: void setNoticeService(NoticeService noticeService)
focal_class.class_method_signature: NoticeController.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: NoticeController.save(@Valid @RequestBody Notice model)
focal_class.full_signature: @Override @PostMapping @ApiOperation("保存通知") @PreAuthorize("hasAnyAuthority('" + ADD_PERM + "')") public Result<Notice> save(@Valid @RequestBody Notice model)
focal_class.identifier: save
focal_class.modifiers: @Override @PostMapping @ApiOperation("保存通知") @PreAuthorize("hasAnyAuthority('" + ADD_PERM + "')") public
focal_class.parameters: (@Valid @RequestBody Notice model)
focal_class.return: Result<Notice>
focal_class.signature: Result<Notice> save(@Valid @RequestBody Notice model)
focal_class.class_method_signature: NoticeController.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: NoticeController.update(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id, @RequestBody Notice 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<Notice> update(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id, @RequestBody Notice 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 Notice model) {
focal_class.return: Result<Notice>
focal_class.signature: Result<Notice> update(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id, @RequestBody Notice model) {
focal_class.class_method_signature: NoticeController.findAll(Notice model)
focal_class.full_signature: @Override @GetMapping @ApiOperation("查询所有通知") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public Result<List<Notice>> findAll(Notice model)
focal_class.identifier: findAll
focal_class.modifiers: @Override @GetMapping @ApiOperation("查询所有通知") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public
focal_class.parameters: (Notice model)
focal_class.return: Result<List<Notice>>
focal_class.signature: Result<List<Notice>> findAll(Notice model)
focal_class.class_method_signature: NoticeController.query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice model) {
focal_class.full_signature: @Override @GetMapping("/{page:[0-9]+}/{size:[0-9]+}") @ApiOperation("分页查询通知列表") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public Result<QueryResult<Notice>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice 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, Notice model) {
focal_class.return: Result<QueryResult<Notice>>
focal_class.signature: Result<QueryResult<Notice>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice model) {
focal_class.class_method_signature: NoticeController.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<Notice> 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<Notice>
focal_class.signature: Result<Notice> findById(@ApiParam(value = "主键id", required = true) @PathVariable("id") String id) {
focal_class.class_method_signature: NoticeController.importData(MultipartFile file)
focal_class.full_signature: @Override @PostMapping("/import") @ApiOperation("从文件导入通知") @PreAuthorize("hasAnyAuthority('" + IMPORT_PERM + "')") public Result<List<Notice>> 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<Notice>>
focal_class.signature: Result<List<Notice>> importData(MultipartFile file)
focal_class.class_method_signature: NoticeController.exportData(@RequestParam(required = false) List<String> ids, HttpServletResponse response)
focal_class.full_signature: @Override @GetMapping("/export") @ApiOperation("导出通知到文件") @PreAuthorize("permitAll()") public void exportData(@RequestParam(required = false) List<String> ids, HttpServletResponse response)
focal_class.identifier: exportData
focal_class.modifiers: @Override @GetMapping("/export") @ApiOperation("导出通知到文件") @PreAuthorize("permitAll()") public
focal_class.parameters: (@RequestParam(required = false) List<String> ids, HttpServletResponse response)
focal_class.return: void
focal_class.signature: void exportData(@RequestParam(required = false) List<String> ids, HttpServletResponse response)
focal_class.class_method_signature: NoticeController.batch(@RequestBody BatchModel<Notice> 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<Notice> 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<Notice> batch)
focal_class.return: Result
focal_class.signature: Result batch(@RequestBody BatchModel<Notice> batch)
focal_class.class_method_signature: NoticeController.sendNotice(@ApiParam("通知id") @PathVariable String noticeId, @ApiParam("用户id数组") @RequestBody String[] receiverIds) {
focal_class.full_signature: @PostMapping("/sendNotice/{noticeId:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("发送通知") @PreAuthorize("isAuthenticated()") public Result<Void> sendNotice(@ApiParam("通知id") @PathVariable String noticeId, @ApiParam("用户id数组") @RequestBody String[] receiverIds) {
focal_class.identifier: sendNotice
focal_class.modifiers: @PostMapping("/sendNotice/{noticeId:^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9]+$}") @ApiOperation("发送通知") @PreAuthorize("isAuthenticated()") public
focal_class.parameters: (@ApiParam("通知id") @PathVariable String noticeId, @ApiParam("用户id数组") @RequestBody String[] receiverIds) {
focal_class.return: Result<Void>
focal_class.signature: Result<Void> sendNotice(@ApiParam("通知id") @PathVariable String noticeId, @ApiParam("用户id数组") @RequestBody String[] receiverIds) {
focal_class.class_method_signature: NoticeController.receiveNotice()
focal_class.full_signature: @GetMapping("/receiveNotice") @ApiOperation("接收通知") @PreAuthorize("isAuthenticated()") public Result<List<NotificationRecord>> receiveNotice()
focal_class.identifier: receiveNotice
focal_class.modifiers: @GetMapping("/receiveNotice") @ApiOperation("接收通知") @PreAuthorize("isAuthenticated()") public
focal_class.parameters: ()
focal_class.return: Result<List<NotificationRecord>>
focal_class.signature: Result<List<NotificationRecord>> receiveNotice()
focal_class.superclass: extends BaseControllerImpl<Notice>
focal_method.body: @Override
      @GetMapping("/{page:[0-9]+}/{size:[0-9]+}")
      @ApiOperation("分页查询通知列表")
      @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')")
      public Result<QueryResult<Notice>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice model) {
          return super.query(page, size, model);
      }
focal_method.class_method_signature: NoticeController.query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice model) {
focal_method.full_signature: @Override @GetMapping("/{page:[0-9]+}/{size:[0-9]+}") @ApiOperation("分页查询通知列表") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public Result<QueryResult<Notice>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice model) {
focal_method.identifier: query
focal_method.invocations: query
focal_method.modifiers: @Override @GetMapping("/{page:[0-9]+}/{size:[0-9]+}") @ApiOperation("分页查询通知列表") @PreAuthorize("hasAnyAuthority('" + QUERY_PERM + "')") public
focal_method.parameters: (@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice model) {
focal_method.return: Result<QueryResult<Notice>>
focal_method.signature: Result<QueryResult<Notice>> query(@ApiParam(value = "页码", required = true) @PathVariable("page") int page, @ApiParam(value = "每页数据条数", required = true) @PathVariable("size") int size, Notice model) {