提交 66f4a64a 编写于 作者: minghao.wu's avatar minghao.wu

fix: 修改参数

上级 cc5418a0
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册