Browse Source

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

master
zxc 4 years ago
parent
commit
9657a77123
  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. 24
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  4. 22
      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

@ -82,6 +82,11 @@ public class GetPastTopicListV2ResultDTO implements Serializable {
*/
private Boolean isExpirat;
/**
* 是否变更yesno
*/
private String isChange = "no";
@JsonIgnore
private String userId;
}

6
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java

@ -90,6 +90,11 @@ public class LatestTenResultDTO implements Serializable {
*/
private Boolean isExpirat;
/**
* 是否变更yesno
*/
private String isChange;
public LatestTenResultDTO() {
this.id = "";
this.userId = "";
@ -106,5 +111,6 @@ public class LatestTenResultDTO implements Serializable {
this.readOrUnRead = "";
this.unReadCount = NumConstant.ZERO;
this.isExpirat = false;
this.isChange = "no";
}
}

24
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java

@ -862,13 +862,25 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
resultDTO.setTopicImgs(attachmentUrls);
//3.拿取用户信息
ResiGroupEntity group = resiGroupDao.selectById(topicDetail.getGroupId());
if ("branch".equals(group.getGroupType())) {
List<String> userIds = new ArrayList<>();
userIds.add(topicDetail.getCreatedBy());
List<UserInfoResultDTO> userInfos = disPoseUserInfo(group.getGroupType(), userIds);
userInfos.forEach(u -> {
if (topicDetail.getCreatedBy().equals(u.getUserId())) {
resultDTO.setReleaseUserName(StringUtils.isBlank(u.getReleaseUserName()) ? "" : u.getReleaseUserName());
resultDTO.setReleaseUserHeadPhoto(StringUtils.isBlank(u.getReleaseUserHeadPhoto()) ? "" : u.getReleaseUserHeadPhoto());
}
});
//ResiGroupEntity group = resiGroupDao.selectById(topicDetail.getGroupId());
ResiGroupMemberInfoRedisDTO memberRedis =
resiGroupMemberRedis.get(topicDetail.getGroupId(),topicDetail.getCreatedBy());
if(null != memberRedis && StringUtils.isNotBlank(memberRedis.getUserId())){
resultDTO.setReleaseUserName(StringUtils.isBlank(memberRedis.getUserShowName()) ? "" : memberRedis.getUserShowName());
resultDTO.setReleaseUserHeadPhoto(StringUtils.isBlank(memberRedis.getUserHeadPhoto()) ? "" : memberRedis.getUserHeadPhoto());
} else {
ResiGroupMemberInfoRedisDTO memberRedis =
resiGroupMemberRedis.get(topicDetail.getGroupId(), topicDetail.getCreatedBy());
if (null != memberRedis && StringUtils.isNotBlank(memberRedis.getUserId())) {
resultDTO.setReleaseUserName(StringUtils.isBlank(memberRedis.getUserShowName()) ? "" : memberRedis.getUserShowName());
resultDTO.setReleaseUserHeadPhoto(StringUtils.isBlank(memberRedis.getUserHeadPhoto()) ? "" : memberRedis.getUserHeadPhoto());
}
}
//4.话题关闭详情

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

@ -553,7 +553,7 @@
<!-- 查询 话题、通知、活动最近10条数据 -->
<select id="selectLatestTen" resultType="com.epmet.resi.group.dto.topic.result.LatestTenResultDTO">
SELECT id,userId,releaseTime,content,status,issueId,contentType,firstPhoto FROM
SELECT id,userId,releaseTime,content,status,issueId,contentType,firstPhoto,isChange FROM
((SELECT
t.ID,
t.CREATED_BY AS userId,
@ -563,7 +563,8 @@
IFNULL(t.ISSUE_ID,'') AS issueId,
'topic' AS contentType,
IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto,
false AS isExpirat
false AS isExpirat,
'no' AS isChange
FROM resi_topic t
LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = t.ID AND ta.ATTACHMENT_TYPE = 'image' AND ta.DEL_FLAG = '0' AND ta.SORT = 0
WHERE t.DEL_FLAG = '0'
@ -581,7 +582,8 @@
'' AS issueId,
'act' AS contentType,
IFNULL(ac2.CONTENT,'') AS firstPhoto,
false AS isExpirat
false AS isExpirat,
'no' AS isChange
FROM group_act_info ai
LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1
WHERE ai.DEL_FLAG = '0'
@ -598,7 +600,8 @@
'' AS issueId,
'notice' AS contentType,
IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto,
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat,
n.IS_CHANGE
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'
@ -788,7 +791,7 @@
</select>
<!-- 根据IDs查询 topic,act,notice信息 -->
<select id="getPastTopicListV2ByIds" resultType="com.epmet.resi.group.dto.topic.result.GetPastTopicListV2ResultDTO">
SELECT id,userId,releaseTime,content,status,issueId,contentType,isExpirat FROM
SELECT id,userId,releaseTime,content,status,issueId,contentType,isExpirat,isChange FROM
((SELECT
t.ID,
t.CREATED_BY AS userId,
@ -797,7 +800,8 @@
t.`STATUS` AS status,
IFNULL(t.ISSUE_ID,'') AS issueId,
'topic' AS contentType,
false AS isExpirat
false AS isExpirat,
'no' AS isChange
FROM resi_topic t
WHERE t.DEL_FLAG = '0'
AND t.`STATUS` != 'hidden'
@ -816,7 +820,8 @@
ai.`STATUS` AS status,
'' AS issueId,
'act' AS contentType,
false AS isExpirat
false AS isExpirat,
'no' AS isChange
FROM group_act_info ai
WHERE ai.DEL_FLAG = '0'
AND (
@ -834,7 +839,8 @@
'' AS status,
'' AS issueId,
'notice' AS contentType,
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat
(CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) <![CDATA[ < ]]> UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat,
n.IS_CHANGE
FROM notice n
WHERE n.DEL_FLAG = '0'
AND (

Loading…
Cancel
Save