|
|
|
@ -8,6 +8,7 @@
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="pingceId" column="pingce_id" />
|
|
|
|
<result property="pingceId" column="pingce_id" />
|
|
|
|
<result property="pingceName" column="pingce_name" />
|
|
|
|
<result property="pingceName" column="pingce_name" />
|
|
|
|
|
|
|
|
<result property="bkhdxType" column="bkhdx_type" />
|
|
|
|
<result property="khitemId" column="khitem_id" />
|
|
|
|
<result property="khitemId" column="khitem_id" />
|
|
|
|
<result property="khitemName" column="khitem_name" />
|
|
|
|
<result property="khitemName" column="khitem_name" />
|
|
|
|
<result property="khitemTypeid" column="khitem_typeId" />
|
|
|
|
<result property="khitemTypeid" column="khitem_typeId" />
|
|
|
|
@ -29,14 +30,16 @@
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectKhVoteVo">
|
|
|
|
<sql id="selectKhVoteVo">
|
|
|
|
select id, pingce_id, pingce_name, khitem_id, khitem_name, khitem_typeId, vote_items, vote_title, v_description, s_time, e_time, max_num, umax, percentage, `state`,same_percent, create_by, create_time, update_by, update_time, remark from kh_vote
|
|
|
|
select id, pingce_id, pingce_name,bkhdx_type, khitem_id, khitem_name, khitem_typeId, vote_items, vote_title, v_description, s_time, e_time, max_num, umax, percentage, `state`,same_percent, create_by, create_time, update_by, update_time, remark from kh_vote
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhVoteList" parameterType="KhVote" resultMap="KhVoteResult">
|
|
|
|
<select id="selectKhVoteList" parameterType="KhVote" 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
|
|
|
|
|
|
|
|
<!--left join kh_pingce p on v.pingce_id=p.id-->
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="pingceId != null "> and pingce_id = #{pingceId}</if>
|
|
|
|
<if test="pingceId != null "> and pingce_id = #{pingceId}</if>
|
|
|
|
<if test="pingceName != null and pingceName != ''"> and pingce_name like concat('%', #{pingceName}, '%')</if>
|
|
|
|
<if test="pingceName != null and pingceName != ''"> and pingce_name like concat('%', #{pingceName}, '%')</if>
|
|
|
|
|
|
|
|
<!-- <if test="pingceName != null and pingceName != ''"> and p.bkhdx_type = #{bkhdxType}=</if>-->
|
|
|
|
<if test="khitemId != null "> and khitem_id = #{khitemId}</if>
|
|
|
|
<if test="khitemId != null "> and khitem_id = #{khitemId}</if>
|
|
|
|
<if test="khitemName != null and khitemName != ''"> and khitem_name like concat('%', #{khitemName}, '%')</if>
|
|
|
|
<if test="khitemName != null and khitemName != ''"> and khitem_name like concat('%', #{khitemName}, '%')</if>
|
|
|
|
<if test="khitemTypeid != null "> and khitem_typeId = #{khitemTypeid}</if>
|
|
|
|
<if test="khitemTypeid != null "> and khitem_typeId = #{khitemTypeid}</if>
|
|
|
|
@ -52,7 +55,7 @@
|
|
|
|
<if test="samePercent != null and samePercent != ''"> and same_percent = #{samePercent}</if>
|
|
|
|
<if test="samePercent != null and samePercent != ''"> and same_percent = #{samePercent}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!--生成评测账号登录时筛选符合条件的vote展示评分-->
|
|
|
|
<select id="getListByPcIdAndItemIds" parameterType="KhVote" resultMap="KhVoteResult">
|
|
|
|
<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
|
|
|
|
select v.*,it.type_id from kh_vote v left join kh_items it on v.khitem_id =it.id
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
@ -73,7 +76,8 @@
|
|
|
|
</select>
|
|
|
|
</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,p.bkhdx_type from kh_vote v left join kh_items it on v.khitem_id =it.id
|
|
|
|
|
|
|
|
left join kh_pingce p on v.pingce_id=p.id
|
|
|
|
where v.id = #{id}
|
|
|
|
where v.id = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|