|
|
|
@ -1,16 +1,21 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.ruoyi.kaohe.mapper.KhVoteMapper">
|
|
|
|
<mapper namespace="com.ruoyi.kaohe.mapper.KhVoteMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="KhVote" id="KhVoteResult">
|
|
|
|
<resultMap type="KhVote" id="KhVoteResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
|
|
|
<result property="pingceId" column="pingce_id" />
|
|
|
|
|
|
|
|
<result property="pingceName" column="pingce_name" />
|
|
|
|
|
|
|
|
<result property="khitemId" column="khitem_id" />
|
|
|
|
|
|
|
|
<result property="khitemName" column="khitem_name" />
|
|
|
|
<result property="voteTitle" column="vote_title" />
|
|
|
|
<result property="voteTitle" column="vote_title" />
|
|
|
|
<result property="vDescription" column="v_description" />
|
|
|
|
<result property="vDescription" column="v_description" />
|
|
|
|
<result property="sTime" column="s_time" />
|
|
|
|
<result property="sTime" column="s_time" />
|
|
|
|
<result property="eTime" column="e_time" />
|
|
|
|
<result property="eTime" column="e_time" />
|
|
|
|
<result property="maxNum" column="max_num" />
|
|
|
|
<result property="maxNum" column="max_num" />
|
|
|
|
|
|
|
|
<result property="state" column="state" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
@ -19,20 +24,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectKhVoteVo">
|
|
|
|
<sql id="selectKhVoteVo">
|
|
|
|
select id, vote_title, v_description, s_time, e_time, max_num, create_by, create_time, update_by, update_time, remark from kh_vote
|
|
|
|
select id, pingce_id, pingce_name, khitem_id, khitem_name, vote_title, v_description, s_time, e_time, max_num, state, 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">
|
|
|
|
<include refid="selectKhVoteVo"/>
|
|
|
|
<include refid="selectKhVoteVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="pingceId != null "> and pingce_id = #{pingceId}</if>
|
|
|
|
|
|
|
|
<if test="pingceName != null and pingceName != ''"> and pingce_name like concat('%', #{pingceName}, '%')</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="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''"> and vote_title = #{voteTitle}</if>
|
|
|
|
<if test="vDescription != null and vDescription != ''"> and v_description = #{vDescription}</if>
|
|
|
|
<if test="vDescription != null and vDescription != ''"> and v_description = #{vDescription}</if>
|
|
|
|
<if test="sTime != null "> and s_time = #{sTime}</if>
|
|
|
|
<if test="sTime != null "> and s_time = #{sTime}</if>
|
|
|
|
<if test="eTime != null "> and e_time = #{eTime}</if>
|
|
|
|
<if test="eTime != null "> and e_time = #{eTime}</if>
|
|
|
|
<if test="maxNum != null "> and max_num = #{maxNum}</if>
|
|
|
|
<if test="maxNum != null "> and max_num = #{maxNum}</if>
|
|
|
|
|
|
|
|
<if test="state != null and state != ''"> and state = #{state}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhVoteById" parameterType="Long" resultMap="KhVoteResult">
|
|
|
|
<select id="selectKhVoteById" parameterType="Long" resultMap="KhVoteResult">
|
|
|
|
<include refid="selectKhVoteVo"/>
|
|
|
|
<include refid="selectKhVoteVo"/>
|
|
|
|
where id = #{id}
|
|
|
|
where id = #{id}
|
|
|
|
@ -41,39 +51,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<insert id="insertKhVote" parameterType="KhVote" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
<insert id="insertKhVote" parameterType="KhVote" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
insert into kh_vote
|
|
|
|
insert into kh_vote
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="pingceId != null">pingce_id,</if>
|
|
|
|
|
|
|
|
<if test="pingceName != null">pingce_name,</if>
|
|
|
|
|
|
|
|
<if test="khitemId != null">khitem_id,</if>
|
|
|
|
|
|
|
|
<if test="khitemName != null">khitem_name,</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''">vote_title,</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''">vote_title,</if>
|
|
|
|
<if test="vDescription != null">v_description,</if>
|
|
|
|
<if test="vDescription != null">v_description,</if>
|
|
|
|
<if test="sTime != null">s_time,</if>
|
|
|
|
<if test="sTime != null">s_time,</if>
|
|
|
|
<if test="eTime != null">e_time,</if>
|
|
|
|
<if test="eTime != null">e_time,</if>
|
|
|
|
<if test="maxNum != null">max_num,</if>
|
|
|
|
<if test="maxNum != null">max_num,</if>
|
|
|
|
|
|
|
|
<if test="state != null">state,</if>
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="pingceId != null">#{pingceId},</if>
|
|
|
|
|
|
|
|
<if test="pingceName != null">#{pingceName},</if>
|
|
|
|
|
|
|
|
<if test="khitemId != null">#{khitemId},</if>
|
|
|
|
|
|
|
|
<if test="khitemName != null">#{khitemName},</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''">#{voteTitle},</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''">#{voteTitle},</if>
|
|
|
|
<if test="vDescription != null">#{vDescription},</if>
|
|
|
|
<if test="vDescription != null">#{vDescription},</if>
|
|
|
|
<if test="sTime != null">#{sTime},</if>
|
|
|
|
<if test="sTime != null">#{sTime},</if>
|
|
|
|
<if test="eTime != null">#{eTime},</if>
|
|
|
|
<if test="eTime != null">#{eTime},</if>
|
|
|
|
<if test="maxNum != null">#{maxNum},</if>
|
|
|
|
<if test="maxNum != null">#{maxNum},</if>
|
|
|
|
|
|
|
|
<if test="state != null">#{state},</if>
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<update id="updateKhVote" parameterType="KhVote">
|
|
|
|
<update id="updateKhVote" parameterType="KhVote">
|
|
|
|
update kh_vote
|
|
|
|
update kh_vote
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="pingceId != null">pingce_id = #{pingceId},</if>
|
|
|
|
|
|
|
|
<if test="pingceName != null">pingce_name = #{pingceName},</if>
|
|
|
|
|
|
|
|
<if test="khitemId != null">khitem_id = #{khitemId},</if>
|
|
|
|
|
|
|
|
<if test="khitemName != null">khitem_name = #{khitemName},</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''">vote_title = #{voteTitle},</if>
|
|
|
|
<if test="voteTitle != null and voteTitle != ''">vote_title = #{voteTitle},</if>
|
|
|
|
<if test="vDescription != null">v_description = #{vDescription},</if>
|
|
|
|
<if test="vDescription != null">v_description = #{vDescription},</if>
|
|
|
|
<if test="sTime != null">s_time = #{sTime},</if>
|
|
|
|
<if test="sTime != null">s_time = #{sTime},</if>
|
|
|
|
<if test="eTime != null">e_time = #{eTime},</if>
|
|
|
|
<if test="eTime != null">e_time = #{eTime},</if>
|
|
|
|
<if test="maxNum != null">max_num = #{maxNum},</if>
|
|
|
|
<if test="maxNum != null">max_num = #{maxNum},</if>
|
|
|
|
|
|
|
|
<if test="state != null">state = #{state},</if>
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
@ -88,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteKhVoteByIds" parameterType="String">
|
|
|
|
<delete id="deleteKhVoteByIds" parameterType="String">
|
|
|
|
delete from kh_vote where id in
|
|
|
|
delete from kh_vote where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
|