From d0cca3951c26b055966f8eb4a4a083081d1c0b1b Mon Sep 17 00:00:00 2001 From: wangliwen Date: Thu, 23 Jun 2022 15:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/renren/common/aspect/ActivitiNoticeAspect.java | 2 ++ .../java/io/renren/common/controller/CommentController.java | 4 ++-- .../java/io/renren/modules/notice/entity/SysNoticeEntity.java | 2 ++ .../modules/notice/service/impl/SysNoticeServiceImpl.java | 4 +++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java b/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java index 0e607ce0..a579cd85 100644 --- a/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java +++ b/renren-admin/src/main/java/io/renren/common/aspect/ActivitiNoticeAspect.java @@ -333,6 +333,7 @@ public class ActivitiNoticeAspect { dto.setSenderDate(new Date()); dto.setCreator(sysUserService.getByUsername("admin").getId()); dto.setCreateDate(new Date()); + dto.setFrom("通知"); sysNoticeService.save(dto); }).thenRunAsync(() -> { // 审批者 SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator)); @@ -348,6 +349,7 @@ public class ActivitiNoticeAspect { dto.setSenderDate(new Date()); dto.setCreator(sysUserService.getByUsername("admin").getId()); dto.setCreateDate(new Date()); + dto.setFrom("通知"); sysNoticeService.save(dto); }).thenRunAsync(() -> { // 防止重放 new Thread(() -> { diff --git a/renren-admin/src/main/java/io/renren/common/controller/CommentController.java b/renren-admin/src/main/java/io/renren/common/controller/CommentController.java index eaacef34..d1af1715 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CommentController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CommentController.java @@ -26,7 +26,7 @@ import java.util.HashMap; import java.util.Map; import java.util.concurrent.CompletableFuture; -@Api(tags = "") +@Api(tags = "评论审核") @RestController @RequestMapping("/comment/center") public class CommentController { @@ -88,7 +88,7 @@ public class CommentController { tDemandCommentDTO.setDelFlag(3); // 审核中 tDemandCommentService.update(tDemandCommentDTO); - + CompletableFuture.runAsync(() -> { if (Long.valueOf(dto.getBusinessKey()) != null) { jdbcTemplate.update(String.format("UPDATE t_demand_comment SET instance_id = '%s' WHERE id = %s", dto.getProcessInstanceId(), dto.getBusinessKey())); diff --git a/renren-admin/src/main/java/io/renren/modules/notice/entity/SysNoticeEntity.java b/renren-admin/src/main/java/io/renren/modules/notice/entity/SysNoticeEntity.java index 1054c815..2d702bea 100644 --- a/renren-admin/src/main/java/io/renren/modules/notice/entity/SysNoticeEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/notice/entity/SysNoticeEntity.java @@ -40,6 +40,7 @@ public class SysNoticeEntity extends BaseEntity { /** * 发送状态 0:草稿 1:已发布 */ + @TableField(value = "`status`") private Integer status; /** * 发送者 @@ -68,5 +69,6 @@ public class SysNoticeEntity extends BaseEntity { /** * 通知来源 (通知、评论、其他) */ + @TableField(value = "`from`") private String from; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java index d4e46ee1..9dd35d46 100644 --- a/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java @@ -86,7 +86,9 @@ public class SysNoticeServiceImpl extends CrudServiceImpl