From 57ef5a7c467bcc7314213ec3f13a07aa429dc97d Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 23 Apr 2021 14:43:04 +0800 Subject: [PATCH 1/3] SHOULD_READ --- .../src/main/resources/db/migration/V0.0.16__group_act.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql index a80b4f042b..c1da5b98ef 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql @@ -291,6 +291,7 @@ CREATE TABLE `group_act_info` ( `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(活动发布时间)', `UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', + `SHOULD_READ` int(11) NOT NULL COMMENT '应读人数', PRIMARY KEY (`ID`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动信息' ROW_FORMAT = Dynamic; From b71e3dab92457d36e4dca85fa1104c1ddf5dae8b Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 23 Apr 2021 14:43:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E6=B7=BB=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E8=BF=87=E6=9C=9F=E5=AD=97=E6=AE=B5=20=E8=BF=91?= =?UTF-8?q?=E5=8D=81=E6=9D=A1=E6=95=B0=E6=8D=AE=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E8=BF=87=E6=9C=9F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/GetPastTopicListV2ResultDTO.java | 5 +++++ .../dto/topic/result/LatestTenResultDTO.java | 6 ++++++ .../resources/mapper/group/ResiGroupDao.xml | 18 ++++++++++++------ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java index 3885933a78..842e720615 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java @@ -77,6 +77,11 @@ public class GetPastTopicListV2ResultDTO implements Serializable { */ private List badgeList = new ArrayList<>(); + /** + * 通知是否过期(true:是 false:否) + */ + private Boolean isExpirat; + @JsonIgnore private String userId; } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java index e5346ab703..fd5637ba98 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java @@ -85,6 +85,11 @@ public class LatestTenResultDTO implements Serializable { */ private Integer unReadCount; + /** + * 通知是否过期(true:是 false:否) + */ + private Boolean isExpirat; + public LatestTenResultDTO() { this.id = ""; this.userId = ""; @@ -100,5 +105,6 @@ public class LatestTenResultDTO implements Serializable { this.contentType = ""; this.readOrUnRead = ""; this.unReadCount = NumConstant.ZERO; + this.isExpirat = false; } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index d8859c6133..ca54aac3a4 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -561,7 +561,8 @@ t.`STATUS` AS status, IFNULL(t.ISSUE_ID,'') AS issueId, 'topic' AS contentType, - IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto + IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto, + false AS isExpirat FROM resi_topic t LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = t.ID AND ta.ATTACHMENT_TYPE = 'image' AND ta.SORT = 0 WHERE t.DEL_FLAG = '0' @@ -578,7 +579,8 @@ ai.`STATUS` AS status, '' AS issueId, 'act' AS contentType, - IFNULL(ac2.CONTENT,'') AS firstPhoto + IFNULL(ac2.CONTENT,'') AS firstPhoto, + false AS isExpirat FROM group_act_info ai LEFT JOIN group_act_content ac ON ac.GROUP_ACT_ID = ai.ID AND ac.CONTENT_TYPE = 'text' LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.SORT = 1 @@ -595,7 +597,8 @@ '' AS status, '' AS issueId, 'notice' AS contentType, - IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto + IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto, + (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat FROM notice n LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 WHERE n.DEL_FLAG = '0' @@ -777,7 +780,8 @@ t.TOPIC_CONTENT AS content, t.`STATUS` AS status, IFNULL(t.ISSUE_ID,'') AS issueId, - 'topic' AS contentType + 'topic' AS contentType, + false AS isExpirat FROM resi_topic t WHERE t.DEL_FLAG = '0' AND t.`STATUS` != 'hidden' @@ -795,7 +799,8 @@ IFNULL(ac.CONTENT,'') AS content, ai.`STATUS` AS status, '' AS issueId, - 'act' AS contentType + 'act' AS contentType, + false AS isExpirat FROM group_act_info ai LEFT JOIN group_act_content ac ON ac.GROUP_ACT_ID = ai.ID AND ac.CONTENT_TYPE = 'text' WHERE ai.DEL_FLAG = '0' @@ -813,7 +818,8 @@ n.CONTENT AS content, '' AS status, '' AS issueId, - 'notice' AS contentType + 'notice' AS contentType, + (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat FROM notice n WHERE n.DEL_FLAG = '0' AND ( From 820272b7cc895be1ad0ad7ab119b6b5287130eeb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 23 Apr 2021 15:15:11 +0800 Subject: [PATCH 3/3] selectLatestTen --- .../src/main/resources/mapper/group/ResiGroupDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index d8859c6133..6c63ddeec8 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -556,7 +556,7 @@ ((SELECT t.ID, t.CREATED_BY AS userId, - DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(t.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, t.TOPIC_CONTENT AS content, t.`STATUS` AS status, IFNULL(t.ISSUE_ID,'') AS issueId, @@ -573,7 +573,7 @@ (SELECT ai.ID, ai.CREATED_BY AS userId, - DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, IFNULL(ac.CONTENT,'') AS content, ai.`STATUS` AS status, '' AS issueId, @@ -590,7 +590,7 @@ (SELECT n.ID, n.CREATED_BY AS userId, - DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%m:%s') AS releaseTime, + DATE_FORMAT(n.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime, n.CONTENT AS content, '' AS status, '' AS issueId,