首页按条件查询评分任务接口

main 15
hshansha 6 months ago
parent ed0c8ca762
commit 6d4eb32eaa

@ -55,6 +55,17 @@ public class KhVoteController extends BaseController
List<KhVote> list = khVoteService.selectKhVoteList(khVote); List<KhVote> list = khVoteService.selectKhVoteList(khVote);
return getDataTable(list); return getDataTable(list);
} }
/**
* pingceIditemIdsstate
*/
@PreAuthorize("@ss.hasPermi('kaohe:vote:list')")
@GetMapping("/listByConditons")
public TableDataInfo getListByConditons(KhVote khVote)
{
startPage();
List<KhVote> list = khVoteService.getListByPcIdAndItemIds(khVote);
return getDataTable(list);
}
/** /**
* *

@ -2,6 +2,8 @@ package com.ruoyi.kaohe.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@ -74,6 +76,20 @@ public class KhVote extends BaseEntity
/** 状态(0 未开始 1 进行中 2 完成) */ /** 状态(0 未开始 1 进行中 2 完成) */
@Excel(name = "状态(0 未开始 1 进行中 2 完成)") @Excel(name = "状态(0 未开始 1 进行中 2 完成)")
private String state; private String state;
/**
*
* @return
*/
private List<Long> itemIds;
public List<Long> getItemIds() {
return itemIds;
}
public void setItemIds(List<Long> itemIds) {
this.itemIds = itemIds;
}
public void setId(Long id) public void setId(Long id)
{ {

@ -58,4 +58,6 @@ public interface KhVoteMapper
* @return * @return
*/ */
public int deleteKhVoteByIds(Long[] ids); public int deleteKhVoteByIds(Long[] ids);
List<KhVote> getListByPcIdAndItemIds(KhVote khVote);
} }

@ -58,4 +58,6 @@ public interface IKhVoteService
* @return * @return
*/ */
public int deleteKhVoteById(Long id); public int deleteKhVoteById(Long id);
List<KhVote> getListByPcIdAndItemIds(KhVote khVote);
} }

@ -93,4 +93,9 @@ public class KhVoteServiceImpl implements IKhVoteService
{ {
return khVoteMapper.deleteKhVoteById(id); return khVoteMapper.deleteKhVoteById(id);
} }
@Override
public List<KhVote> getListByPcIdAndItemIds(KhVote khVote) {
return khVoteMapper.getListByPcIdAndItemIds(khVote);
}
} }

@ -49,6 +49,19 @@
</where> </where>
</select> </select>
<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>
<if test="pingceId != null "> and pingce_id = #{pingceId}</if>
<if test="state != null and state != ''"> and state = #{state}</if>
<if test="itemIds != null"> and khitem_id in
<foreach item="itemId" collection="itemIds" open="(" separator="," close=")">
#{itemId}
</foreach>
</if>
</where>
</select>
<select id="selectKhVoteById" parameterType="Long" resultMap="KhVoteResult"> <select id="selectKhVoteById" parameterType="Long" resultMap="KhVoteResult">
select v.*,it.type_id from kh_vote v left join kh_items it on v.khitem_id =it.id select v.*,it.type_id from kh_vote v left join kh_items it on v.khitem_id =it.id
where v.id = #{id} where v.id = #{id}

Loading…
Cancel
Save