| | |
| | | import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.OaNoticeSaveReqVO; |
| | | import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.OaNoticeDO; |
| | | import cn.iocoder.yudao.module.bpm.service.oa.OaNoticeService; |
| | | import cn.iocoder.yudao.module.system.api.storage.StorageAttachmentApi; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | |
| | | @Resource |
| | | private OaNoticeService oaNoticeService; |
| | | |
| | | @Resource |
| | | private StorageAttachmentApi storageAttachmentApi; |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建通知公告") |
| | |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | public CommonResult<OaNoticeRespVO> getNotice(@RequestParam("id") Long id) { |
| | | OaNoticeDO notice = oaNoticeService.getNotice(id, getLoginUserId()); |
| | | return success(BeanUtils.toBean(notice, OaNoticeRespVO.class)); |
| | | OaNoticeRespVO respVO = BeanUtils.toBean(notice, OaNoticeRespVO.class); |
| | | respVO.setAttachmentList(storageAttachmentApi.listAttachments("oa_notice", id)); |
| | | return success(respVO); |
| | | } |
| | | |
| | | @GetMapping("/my-unread-count") |