提交 89e9a03b 编写于 作者: minghao.wu's avatar minghao.wu

fix: 点赞状态和psa回复时间

上级 30328609
......@@ -170,11 +170,11 @@ public class AnalysisController {
/**
* TODO: 如果是PSA 删除时间显示
*/
/*if (analysisRoundExamTitle.getAnalysisId().intValue() == 2 ) {
if (analysisRoundExamTitle.getAnalysisId().intValue() == 2 ) {
for (ReplyDto replyDto : replyDtoList) {
replyDto.setReplayTime("");
}
}*/
}
examTitleReplyDto.setAnalysisId(analysisRoundExamTitle.getAnalysisId());
examTitleReplyDto.setRoundId(analysisRoundExamTitle.getRoundId());
......
......@@ -316,12 +316,18 @@ public class CHCAnalysisServiceImpl implements CHCAnalysisService {
replyDto.setReplayTime(DateUtils.fromNow(reply.getModifiedTime()));
replyDto.setStarCount(starRecordMapper.selectStarCountByReplyId(reply.getId()));
StarRecord starRecord = new StarRecord();
starRecord.setReplyId(reply.getId());
starRecord.setCreatedId(userId);
AnalysisRoundExamTitle analysisRoundExamTitle = analysisRoundExamTitleMapper.selectByPrimaryKey(reply.getAnalysisRoundExamTitleId());
AnalysisRound analysisRound = analysisRoundMapper.selectByPrimaryKey(analysisRoundExamTitle.getRoundId());
replyDto.setStatus(starRecordMapper.selectStarCountByRecord(starRecord) > 0 ? 1: 0);
if ((new Date()).getTime() > analysisRound.getEndTime().getTime()) {
replyDto.setStatus(2);
} else {
StarRecord starRecord = new StarRecord();
starRecord.setReplyId(reply.getId());
starRecord.setCreatedId(userId);
replyDto.setStatus(starRecordMapper.selectStarCountByRecord(starRecord) > 0 ? 1 : 0);
}
return replyDto;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册