|
|
@ -43,6 +43,8 @@ import com.elink.esua.epdc.modules.issue.service.IssueService; |
|
|
|
import com.elink.esua.epdc.modules.item.entity.ItemEntity; |
|
|
|
import com.elink.esua.epdc.modules.item.service.ItemService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
@ -60,6 +62,8 @@ import java.util.Map; |
|
|
|
@Service |
|
|
|
public class EventCommentServiceImpl extends BaseServiceImpl<EventCommentDao, EventCommentEntity> implements EventCommentService { |
|
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(EventCommentServiceImpl.class); |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private EpdcEventsService epdcEventsService; |
|
|
|
|
|
|
@ -229,9 +233,17 @@ public class EventCommentServiceImpl extends BaseServiceImpl<EventCommentDao, Ev |
|
|
|
// 获取议题ID
|
|
|
|
if (StringUtils.isNotEmpty(formDTO.getIssueId())) { |
|
|
|
IssueEntity issueEntity = issueService.selectById(formDTO.getIssueId()); |
|
|
|
if (null == issueEntity) { |
|
|
|
logger.info("获取评论列表失败,议题ID:{}", formDTO.getIssueId()); |
|
|
|
return new Result<EventCommentsResultDTO>().error("获取评论列表失败"); |
|
|
|
} |
|
|
|
formDTO.setEventId(issueEntity.getEventId()); |
|
|
|
} else { |
|
|
|
ItemEntity itemEntity = itemService.selectById(formDTO.getItemId()); |
|
|
|
if (null == itemEntity) { |
|
|
|
logger.info("获取评论列表失败,项目ID:{}", formDTO.getItemId()); |
|
|
|
return new Result<EventCommentsResultDTO>().error("获取评论列表失败"); |
|
|
|
} |
|
|
|
formDTO.setEventId(itemEntity.getEventId()); |
|
|
|
} |
|
|
|
// 表态数
|
|
|
|