|
|
|
|
@ -55,7 +55,7 @@
|
|
|
|
|
<if test="samePercent != null and samePercent != ''"> and same_percent = #{samePercent}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<!--生成评测账号登录时筛选符合条件的vote展示评分-->
|
|
|
|
|
<!--生成评测账号登录时筛选符合条件的vote展示评分 ————废弃———— -->
|
|
|
|
|
<select id="getListByPcIdAndItemIds" parameterType="KhVote" resultMap="KhVoteResult">
|
|
|
|
|
select v.*,it.type_id from kh_vote v left join kh_items it on v.khitem_id =it.id
|
|
|
|
|
<where>
|
|
|
|
|
@ -69,6 +69,20 @@
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<!-- 评测账号登录时筛选符合条件的vote展示评分 -->
|
|
|
|
|
<select id="getListByVoteIds" parameterType="KhVote" resultMap="KhVoteResult">
|
|
|
|
|
select v.*,it.type_id from kh_vote v left join kh_items it on v.khitem_id =it.id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="pingceId != null "> and pingce_id = #{pingceId}</if>
|
|
|
|
|
<!--状态值传1,也就是展示所有状态不等于2(非完成状态)的数据-->
|
|
|
|
|
<if test="state != null and state != ''"> and state != #{state}</if>
|
|
|
|
|
<if test="voteIds != null"> and v.id in
|
|
|
|
|
<foreach item="voteId" collection="voteIds" open="(" separator="," close=")">
|
|
|
|
|
#{voteId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectUnfinishedVote" parameterType="KhVote" resultMap="KhVoteResult">
|
|
|
|
|
select v.*,it.type_id from kh_vote v left join kh_items it on v.khitem_id =it.id
|
|
|
|
|
|