Browse Source

Merge remote-tracking branch 'origin/dev_group_act_notice' into dev_temp

master
yinzuomei 4 years ago
parent
commit
1beb784daa
  1. 5
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java
  2. 6
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java
  3. 1
      epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.16__group_act.sql
  4. 24
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

5
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<String> badgeList = new ArrayList<>(); private List<String> badgeList = new ArrayList<>();
/**
* 通知是否过期(true: false:)
*/
private Boolean isExpirat;
@JsonIgnore @JsonIgnore
private String userId; private String userId;
} }

6
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; private Integer unReadCount;
/**
* 通知是否过期(true: false:)
*/
private Boolean isExpirat;
public LatestTenResultDTO() { public LatestTenResultDTO() {
this.id = ""; this.id = "";
this.userId = ""; this.userId = "";
@ -100,5 +105,6 @@ public class LatestTenResultDTO implements Serializable {
this.contentType = ""; this.contentType = "";
this.readOrUnRead = ""; this.readOrUnRead = "";
this.unReadCount = NumConstant.ZERO; this.unReadCount = NumConstant.ZERO;
this.isExpirat = false;
} }
} }

1
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 '创建时间(活动发布时间)', `CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间(活动发布时间)',
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', `UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', `UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间',
`SHOULD_READ` int(11) NOT NULL COMMENT '应读人数',
PRIMARY KEY (`ID`) USING BTREE PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动信息' ROW_FORMAT = Dynamic; ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织活动信息' ROW_FORMAT = Dynamic;

24
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -557,12 +557,13 @@
((SELECT ((SELECT
t.ID, t.ID,
t.CREATED_BY AS userId, 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.TOPIC_CONTENT AS content,
t.`STATUS` AS status, t.`STATUS` AS status,
IFNULL(t.ISSUE_ID,'') AS issueId, IFNULL(t.ISSUE_ID,'') AS issueId,
'topic' AS contentType, 'topic' AS contentType,
IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto,
false AS isExpirat
FROM resi_topic t 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 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' WHERE t.DEL_FLAG = '0'
@ -574,12 +575,13 @@
(SELECT (SELECT
ai.ID, ai.ID,
ai.CREATED_BY AS userId, 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, IFNULL(ac.CONTENT,'') AS content,
ai.`STATUS` AS status, ai.`STATUS` AS status,
'' AS issueId, '' AS issueId,
'act' AS contentType, 'act' AS contentType,
IFNULL(ac2.CONTENT,'') AS firstPhoto IFNULL(ac2.CONTENT,'') AS firstPhoto,
false AS isExpirat
FROM group_act_info ai 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 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 LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.SORT = 1
@ -591,12 +593,13 @@
(SELECT (SELECT
n.ID, n.ID,
n.CREATED_BY AS userId, 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, n.CONTENT AS content,
'' AS status, '' AS status,
'' AS issueId, '' AS issueId,
'notice' AS contentType, 'notice' AS contentType,
IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto,
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat
FROM notice n 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 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' WHERE n.DEL_FLAG = '0'
@ -793,7 +796,8 @@
t.TOPIC_CONTENT AS content, t.TOPIC_CONTENT AS content,
t.`STATUS` AS status, t.`STATUS` AS status,
IFNULL(t.ISSUE_ID,'') AS issueId, IFNULL(t.ISSUE_ID,'') AS issueId,
'topic' AS contentType 'topic' AS contentType,
false AS isExpirat
FROM resi_topic t FROM resi_topic t
WHERE t.DEL_FLAG = '0' WHERE t.DEL_FLAG = '0'
AND t.`STATUS` != 'hidden' AND t.`STATUS` != 'hidden'
@ -811,7 +815,8 @@
IFNULL(ac.CONTENT,'') AS content, IFNULL(ac.CONTENT,'') AS content,
ai.`STATUS` AS status, ai.`STATUS` AS status,
'' AS issueId, '' AS issueId,
'act' AS contentType 'act' AS contentType,
false AS isExpirat
FROM group_act_info ai 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 ac ON ac.GROUP_ACT_ID = ai.ID AND ac.CONTENT_TYPE = 'text'
WHERE ai.DEL_FLAG = '0' WHERE ai.DEL_FLAG = '0'
@ -829,7 +834,8 @@
n.CONTENT AS content, n.CONTENT AS content,
'' AS status, '' AS status,
'' AS issueId, '' AS issueId,
'notice' AS contentType 'notice' AS contentType,
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat
FROM notice n FROM notice n
WHERE n.DEL_FLAG = '0' WHERE n.DEL_FLAG = '0'
AND ( AND (

Loading…
Cancel
Save