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

Merge branch 'dev_phase3' into release

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