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;