Browse Source

查询话题列表时,将空白的语音内容替换成“语音话题”;查询话题详情时,查询图片附件的条件要加上附件类型

dev_shibei_match
wangchao 5 years ago
parent
commit
4ffcd329eb
  1. 10
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/TopicConstant.java
  2. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  3. 6
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml

10
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/constant/TopicConstant.java

@ -107,4 +107,14 @@ public interface TopicConstant {
String COMMENT_TOPIC_FAILURE = "评论话题加分失败......";
String GET_CUSTOMER_ID_FAILURE = "查询客户ID失败......";
/**
* 字段 附件类型 小写 驼峰
*/
String FIELD_TOPIC_ATTACHMENT_TYPE_HUMP = "attachmentType";
/**
* 字段 附件类型 大写 下划线
*/
String FIELD_TOPIC_ATTACHMENT_TYPE = "ATTACHMENT_TYPE";
}

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

@ -699,6 +699,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
QueryWrapper<ResiTopicAttachmentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(FieldConstant.DEL_FLAG,NumConstant.ZERO_STR);
wrapper.eq(TopicConstant.TOPIC_ID,topicId);
wrapper.eq(TopicConstant.FIELD_TOPIC_ATTACHMENT_TYPE,"image");
wrapper.orderByAsc(TopicConstant.SORT);
List<ResiTopicAttachmentEntity> attachments = resiTopicAttachmentDao.selectList(wrapper);
List<String> attachmentUrls = new ArrayList<>();
@ -1249,6 +1250,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
QueryWrapper<ResiTopicAttachmentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(FieldConstant.DEL_FLAG,NumConstant.ZERO_STR);
wrapper.eq(TopicConstant.TOPIC_ID,formDTO.getTopicId());
wrapper.eq(TopicConstant.FIELD_TOPIC_ATTACHMENT_TYPE,"image");
wrapper.orderByAsc(TopicConstant.SORT);
List<ResiTopicAttachmentEntity> attachments = resiTopicAttachmentDao.selectList(wrapper);
if (attachments.size() != NumConstant.ZERO){

6
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml

@ -155,7 +155,7 @@
SELECT
topic.ID AS topicId,
topic.GROUP_ID,
topic.TOPIC_CONTENT,
IFNULL(topic.TOPIC_CONTENT,'语音话题') AS topicContent,
topic.STATUS,
topic.CREATED_TIME AS releaseTime,
topic.CREATED_BY AS userId,
@ -176,6 +176,7 @@
RESI_TOPIC_ATTACHMENT attachment
WHERE
attachment.DEL_FLAG = '0'
AND attachment.ATTACHMENT_TYPE = 'image'
GROUP BY attachment.TOPIC_ID
) attachement2
ON
@ -202,7 +203,7 @@
SELECT
topic.ID AS topicId,
topic.GROUP_ID,
topic.TOPIC_CONTENT,
IFNULL(topic.TOPIC_CONTENT,'语音话题') AS topicContent,
topic.STATUS,
topic.CREATED_TIME AS releaseTime,
topic.CREATED_BY AS userId,
@ -225,6 +226,7 @@
RESI_TOPIC_ATTACHMENT attachment
WHERE
attachment.DEL_FLAG = '0'
AND attachment.ATTACHMENT_TYPE = 'image'
GROUP BY attachment.TOPIC_ID
) attachement2
ON

Loading…
Cancel
Save