评测账号登录首页访问接口修改

main 61
hshansha 2 months ago
parent 038a879a21
commit c20ee612a2

@ -112,7 +112,7 @@ public class KhVoteController extends BaseController {
}
/**
* pingceIditemIdsstate
* pingceIditemIdsstate
*/
@PreAuthorize("@ss.hasPermi('kaohe:vote:list')")
@GetMapping("/listByConditons")
@ -122,6 +122,18 @@ public class KhVoteController extends BaseController {
List<KhVote> list = khVoteService.getListByPcIdAndItemIds(khVote);
return getDataTable(list);
}
/**
* pingceIditemIdsstate
* : voteIds
*/
@PreAuthorize("@ss.hasPermi('kaohe:vote:list')")
@GetMapping("/ListByVoteIds")
public TableDataInfo getListByVoteIds(KhVote khVote) {
khVote.setState("2");
startPage();
List<KhVote> list = khVoteService.getListByVoteIds(khVote);
return getDataTable(list);
}
/**
*

@ -100,6 +100,17 @@ public class KhVote extends BaseEntity
*/
private List<KhVoteEmp> voteEmps;
//首页查询评分任务的参数
private List<Long> voteIds;
public List<Long> getVoteIds() {
return voteIds;
}
public void setVoteIds(List<Long> voteIds) {
this.voteIds = voteIds;
}
public Integer getUmax() {
return umax;
}

@ -62,4 +62,6 @@ public interface KhVoteMapper
List<KhVote> getListByPcIdAndItemIds(KhVote khVote);
List<KhVote> selectUnfinishedVote();
List<KhVote> getListByVoteIds(KhVote khVote);
}

@ -62,4 +62,6 @@ public interface IKhVoteService
List<KhVote> getListByPcIdAndItemIds(KhVote khVote);
List<KhVote> selectUnfinishedVote();
List<KhVote> getListByVoteIds(KhVote khVote);
}

@ -114,6 +114,9 @@ public class KhVoteServiceImpl implements IKhVoteService
public List<KhVote> getListByPcIdAndItemIds(KhVote khVote) {
return khVoteMapper.getListByPcIdAndItemIds(khVote);
}
public List<KhVote> getListByVoteIds(KhVote khVote) {
return khVoteMapper.getListByVoteIds(khVote);
}
@Override
public List<KhVote> selectUnfinishedVote() {

@ -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

Loading…
Cancel
Save