Browse Source

发布话题修改

dev_shibei_match
wangchao 5 years ago
parent
commit
a41f2d1cb9
  1. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java
  2. 2
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/topic/ResiTopicDao.xml

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

@ -57,9 +57,7 @@ import com.epmet.resi.group.dto.topic.result.ResiTopicDetailResultDTO;
import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO; import com.epmet.resi.group.dto.topic.result.ResiTopicInfoResultDTO;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -203,7 +201,7 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
attachment.setAttachmentUrl(url); attachment.setAttachmentUrl(url);
attachment.setTopicId(topic.getId()); attachment.setTopicId(topic.getId());
attachment.setCreatedBy(tokenDto.getUserId()); attachment.setCreatedBy(tokenDto.getUserId());
attachment.setAttachmentFormat(url.substring(url.lastIndexOf("\\.") + 1).toLowerCase()); attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + 1).toLowerCase());
attachment.setSort(sort++); attachment.setSort(sort++);
resiTopicAttachmentDao.insertOne(attachment); resiTopicAttachmentDao.insertOne(attachment);
} }
@ -287,7 +285,6 @@ public class ResiTopicServiceImpl extends BaseServiceImpl<ResiTopicDao, ResiTopi
**/ **/
@Override @Override
public Result<List<ResiTopicInfoResultDTO>> getPastTopicList(TokenDto tokenDto, ResiTopicPageFormDTO topicPageFormDTO) { public Result<List<ResiTopicInfoResultDTO>> getPastTopicList(TokenDto tokenDto, ResiTopicPageFormDTO topicPageFormDTO) {
if (null == tokenDto) { if (null == tokenDto) {
return new Result().error(ModuleConstant.USER_NOT_NULL); return new Result().error(ModuleConstant.USER_NOT_NULL);
} }

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

@ -112,7 +112,7 @@
SELECT SELECT
attachment.TOPIC_ID AS attachmentTopicId, attachment.TOPIC_ID AS attachmentTopicId,
attachment.ATTACHMENT_URL as firstPhoto, attachment.ATTACHMENT_URL as firstPhoto,
MIN(attachment.SORD) MIN(attachment.SORT)
FROM FROM
RESI_TOPIC_ATTACHMENT attachment RESI_TOPIC_ATTACHMENT attachment
WHERE WHERE

Loading…
Cancel
Save