提交 0c90f715 编写于 作者: minghao.wu's avatar minghao.wu

Merge branch 'dev_phase2' into release

......@@ -105,6 +105,8 @@ public class AnalysisController {
@ApiOperation(value = "获取某一轮的题目", response = PicaResponse.class)
@RequestMapping(value = "/roundDetail/{roundId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<RoundExamTitleDto> getRoundDetail(@PathVariable("roundId") Integer roundId) {
System.out.println("roundDetail: roundId" + roundId);
PicaResponse.Builder<RoundExamTitleDto> builder = new PicaResponse.Builder<>();
try {
......@@ -125,7 +127,6 @@ public class AnalysisController {
@RequestMapping(value = "/replyList/{examTitleId}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public PicaResponse<ExamTitleReplyDto> getReplyList(@PathVariable("examTitleId") Integer examTitleId,
@RequestHeader(required = false) String token) {
PICAUser user = null;
if (token != null) {
......
......@@ -18,4 +18,6 @@ public interface AnalysisRoundMapper {
int updateByPrimaryKey(AnalysisRound record);
List<AnalysisRound> selectRoundListById(Integer id);
List<AnalysisRound> selectPSARoundListById(Integer id);
}
\ No newline at end of file
......@@ -103,7 +103,14 @@ public class CHCAnalysisServiceImpl implements CHCAnalysisService {
@Override
public List<AnalysisRoundDto> getRoundListByAnalysisId(Integer analysisId) {
List<AnalysisRound> roundList = analysisRoundMapper.selectRoundListById(analysisId);
List<AnalysisRound> roundList = new ArrayList<>();
CHCAnalysis analysis = analysisMapper.selectByPrimaryKey(analysisId);
if (analysis.getType() == 1)
roundList = analysisRoundMapper.selectRoundListById(analysisId);
else
roundList = analysisRoundMapper.selectPSARoundListById(analysisId);
if (null == roundList){
return null;
......
......@@ -37,6 +37,16 @@
limit 2
</select>
<select id="selectPSARoundListById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_analysis_round
where analysis_id = #{id,jdbcType=INTEGER}
and is_deleted = 0
and is_published = 1
limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_analysis_round
where id = #{id,jdbcType=INTEGER}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册