From 45f2b50ff3e3f51f93d1e1e06eed3bf27139360e Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 28 Apr 2021 15:57:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E9=98=85=E8=AF=BB=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=B7=BB=E5=8A=A0=E8=BF=87=E6=9C=9F=E5=90=8E=E9=98=85?= =?UTF-8?q?=E8=AF=BB=E7=9A=84=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../group/dto/notice/NoticeReadRecordDTO.java | 7 ++++- .../notice/entity/NoticeReadRecordEntity.java | 7 ++++- .../impl/NoticeReadRecordServiceImpl.java | 29 +++++++++++++------ .../service/impl/NoticeServiceImpl.java | 4 +++ .../db/migration/V0.0.20__alter_read.sql | 12 ++++++++ 5 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.20__alter_read.sql diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java index 45924b2e41..e3e61cf54b 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/NoticeReadRecordDTO.java @@ -64,10 +64,15 @@ public class NoticeReadRecordDTO implements Serializable { private String userId; /** - * read已读、un_read未读 + * (通知过期前的阅读状态)read已读、un_read未读 */ private String readFlag; + /** + * (通知过期后的阅读状态)已读:read未读:un_read; + */ + private String viewDetail; + /** * 删除标识 */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java index b22a06c2cc..a8fd72b35a 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/entity/NoticeReadRecordEntity.java @@ -64,8 +64,13 @@ public class NoticeReadRecordEntity extends BaseEpmetEntity { private String userId; /** - * read已读、un_read未读 + * (通知过期前的阅读状态)read已读、un_read未读 */ private String readFlag; + /** + * (通知过期后的阅读状态)已读:read未读:un_read; + */ + private String viewDetail; + } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java index fe871a277d..ba58278c76 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeReadRecordServiceImpl.java @@ -141,16 +141,18 @@ public class NoticeReadRecordServiceImpl extends BaseServiceImpl reafdRecord.setUserId(m.getCustomerUserId()); if ("leader".equals(m.getGroupLeaderFlag())) { reafdRecord.setReadFlag(ReadFlagConstant.READ); + reafdRecord.setViewDetail(ReadFlagConstant.READ); }else { reafdRecord.setReadFlag("un_read"); + reafdRecord.setViewDetail("un_read"); } reafdRecordList.add(reafdRecord); }); @@ -381,8 +383,10 @@ public class NoticeServiceImpl extends BaseServiceImpl reafdRecord.setUserId(m.getCustomerUserId()); if ("leader".equals(m.getGroupLeaderFlag())) { reafdRecord.setReadFlag(ReadFlagConstant.READ); + reafdRecord.setViewDetail(ReadFlagConstant.READ); }else { reafdRecord.setReadFlag("un_read"); + reafdRecord.setViewDetail("un_read"); } reafdRecordList.add(reafdRecord); }); diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.20__alter_read.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.20__alter_read.sql new file mode 100644 index 0000000000..dfa45b6460 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.20__alter_read.sql @@ -0,0 +1,12 @@ +ALTER TABLE `act_read_record` +MODIFY COLUMN `READ_FLAG` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'un_read' COMMENT '活动关闭前已读:read;未读:un_read' AFTER `GROUP_ACT_ID`, +ADD COLUMN `VIEW_DETAIL` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '已读:read未读:un_read;' AFTER `READ_FLAG`; + +UPDATE act_read_record set VIEW_DETAIL = READ_FLAG; + + +ALTER TABLE `notice_read_record` +MODIFY COLUMN `READ_FLAG` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'unread' COMMENT '(通知过期前的阅读状态)read已读、un_read未读' AFTER `USER_ID`, +ADD COLUMN `VIEW_DETAIL` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '(通知过期后的阅读状态)已读:read未读:un_read;' AFTER `READ_FLAG`; + +UPDATE notice_read_record set VIEW_DETAIL = READ_FLAG;