投票评测查询关联查出typeId

main 8
hshansha 6 months ago
parent 07f15204d1
commit 78d69b87ed

@ -67,6 +67,16 @@ public class KhVote extends BaseEntity
@Excel(name = "状态(0 未开始 1 进行中 2 完成)")
private String state;
private String typeId;
public String getTypeId() {
return typeId;
}
public void setTypeId(String typeId) {
this.typeId = typeId;
}
public void setId(Long id)
{
this.id = id;

@ -17,6 +17,7 @@
<result property="maxNum" column="max_num" />
<result property="percentage" column="percentage" />
<result property="state" column="state" />
<result property="typeId" column="type_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
@ -29,7 +30,7 @@
</sql>
<select id="selectKhVoteList" parameterType="KhVote" resultMap="KhVoteResult">
<include refid="selectKhVoteVo"/>
select v.*,it.type_id from kh_vote v left join kh_items on v.khitem_id =it.id
<where>
<if test="pingceId != null "> and pingce_id = #{pingceId}</if>
<if test="pingceName != null and pingceName != ''"> and pingce_name like concat('%', #{pingceName}, '%')</if>
@ -46,7 +47,7 @@
</select>
<select id="selectKhVoteById" parameterType="Long" resultMap="KhVoteResult">
<include refid="selectKhVoteVo"/>
select v.*,it.type_id from kh_vote v left join kh_items on v.khitem_id =it.id
where id = #{id}
</select>

Loading…
Cancel
Save