提交 8db198b2 编写于 作者: minghao.wu's avatar minghao.wu

Merge branch 'dev_phase3' into release

......@@ -12,7 +12,7 @@
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis-common</artifactId>
<name>pica-cloud-analysis-common</name>
<version>1.0.8</version>
<version>1.0.9</version>
<packaging>jar</packaging>
<properties>
......
......@@ -10,6 +10,8 @@ public class ExamTitleReplyDetailDto {
private Integer roundId;
private Integer published;
private ExamTitleDto examTitle;
private ReplyDto reply;
......@@ -40,6 +42,14 @@ public class ExamTitleReplyDetailDto {
this.roundId = roundId;
}
public Integer getPublished() {
return published;
}
public void setPublished(Integer published) {
this.published = published;
}
public ExamTitleDto getExamTitle() {
return examTitle;
}
......
......@@ -12,6 +12,8 @@ public class ExamTitleReplyDto {
private Integer roundId;
private Integer published;
private ExamTitleDto examTitle;
private List<ReplyDto> replyList;
......@@ -42,6 +44,14 @@ public class ExamTitleReplyDto {
this.roundId = roundId;
}
public Integer getPublished() {
return published;
}
public void setPublished(Integer published) {
this.published = published;
}
public ExamTitleDto getExamTitle() {
return examTitle;
}
......
......@@ -138,7 +138,7 @@
<dependency>
<groupId>com.pica.cloud.online.exam</groupId>
<artifactId>pica-cloud-analysis-common</artifactId>
<version>1.0.8</version>
<version>1.0.9</version>
<scope>compile</scope>
</dependency>
......
......@@ -182,6 +182,7 @@ public class AnalysisController {
examTitleReplyDto.setReplyList(replyDtoList);
AnalysisRound analysisRound = analysisService.getRoundInfoById(analysisRoundExamTitle.getRoundId());
examTitleReplyDto.setPublished(analysisRound.getIsPublished() ? 1 : 0);
/**
* 设置回复状态
*/
......@@ -237,7 +238,7 @@ public class AnalysisController {
examTitleReplyDetailDto.setReply(replyDto);
AnalysisRound analysisRound = analysisService.getRoundInfoById(analysisRoundExamTitle.getRoundId());
examTitleReplyDetailDto.setPublished(analysisRound.getIsPublished() ? 1 : 0);
/**
* 设置回复状态
*/
......@@ -404,6 +405,7 @@ public class AnalysisController {
examTitleReplyDto.setReplyList(replyDtoList);
AnalysisRound analysisRound = analysisService.getRoundInfoById(analysisRoundExamTitle.getRoundId());
examTitleReplyDto.setPublished(analysisRound.getIsPublished() ? 1 : 0);
/**
* 设置回复状态
*/
......@@ -459,6 +461,7 @@ public class AnalysisController {
examTitleReplyDetailDto.setReply(replyDto);
AnalysisRound analysisRound = analysisService.getRoundInfoById(analysisRoundExamTitle.getRoundId());
examTitleReplyDetailDto.setPublished(analysisRound.getIsPublished() ? 1 : 0);
/**
* 设置回复状态
*/
......
......@@ -84,29 +84,31 @@
<select id="selectElectedStarCountByExamTitleIdList" resultType="java.lang.Integer">
select
sum(star_count) as star
count(p_star_record.id) as star
from p_reply
where analysis_round_exam_title_id in
join p_star_record on p_reply.id = p_star_record.reply_id and p_star_record.is_deleted = 0
where p_reply.analysis_round_exam_title_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
and is_deleted = 0
group by user_id
order by star desc, created_time
and p_reply.is_deleted = 0
group by p_reply.user_id
order by star desc, max(p_star_record.id)
limit 1
</select>
<select id="selectElectedDoctorIdByExamTitleIdList" resultType="java.lang.Integer">
select
ifnull(user_id,0)
ifnull(p_reply.user_id,0)
from p_reply
where analysis_round_exam_title_id in
join p_star_record on p_reply.id = p_star_record.reply_id and p_star_record.is_deleted = 0
where p_reply.analysis_round_exam_title_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
and is_deleted = 0
group by user_id
order by sum(star_count) desc, created_time
and p_reply.is_deleted = 0
group by p_reply.user_id
order by count(p_star_record.id) desc, max(p_star_record.id)
limit 1
</select>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册