123 lines
6.7 KiB
XML
123 lines
6.7 KiB
XML
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
|
<!DOCTYPE mapper
|
||
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
|
<mapper namespace="com.ruoyi.sip.mapper.ProjectPocInfoMapper">
|
||
|
|
|
||
|
|
<resultMap type="ProjectPocInfo" id="ProjectPocInfoResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="projectId" column="project_id" />
|
||
|
|
<result property="testEnvironment" column="test_environment" />
|
||
|
|
<result property="testProgress" column="test_progress" />
|
||
|
|
<result property="projectUserInfo" column="project_user_info" />
|
||
|
|
<result property="startDate" column="start_date" />
|
||
|
|
<result property="planFinishTime" column="plan_finish_time" />
|
||
|
|
<result property="realFinishTime" column="real_finish_time" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectProjectPocInfoVo">
|
||
|
|
select id, project_id, test_environment, test_progress, project_user_info, start_date, plan_finish_time, real_finish_time, create_by, create_time from project_poc_info
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectProjectPocInfoList" parameterType="ProjectPocInfo" resultMap="ProjectPocInfoResult">
|
||
|
|
<include refid="selectProjectPocInfoVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||
|
|
<if test="testEnvironment != null and testEnvironment != ''"> and test_environment = #{testEnvironment}</if>
|
||
|
|
<if test="testProgress != null and testProgress != ''"> and test_progress = #{testProgress}</if>
|
||
|
|
<if test="projectUserInfo != null and projectUserInfo != ''"> and project_user_info = #{projectUserInfo}</if>
|
||
|
|
<if test="startDate != null "> and start_date = #{startDate}</if>
|
||
|
|
<if test="planFinishTime != null "> and plan_finish_time = #{planFinishTime}</if>
|
||
|
|
<if test="realFinishTime != null "> and real_finish_time = #{realFinishTime}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectProjectPocInfoById" parameterType="Long" resultMap="ProjectPocInfoResult">
|
||
|
|
<include refid="selectProjectPocInfoVo"/>
|
||
|
|
where id = #{id}
|
||
|
|
</select>
|
||
|
|
<select id="listByProjectId" resultType="com.ruoyi.sip.domain.ProjectPocInfo">
|
||
|
|
<include refid="selectProjectPocInfoVo"/>
|
||
|
|
where project_id in (
|
||
|
|
<foreach item="projectId" collection="list" separator=",">
|
||
|
|
#{projectId}
|
||
|
|
</foreach>
|
||
|
|
)
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertProjectPocInfo" parameterType="ProjectPocInfo" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into project_poc_info
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="projectId != null">project_id,</if>
|
||
|
|
<if test="testEnvironment != null">test_environment,</if>
|
||
|
|
<if test="testProgress != null">test_progress,</if>
|
||
|
|
<if test="projectUserInfo != null">project_user_info,</if>
|
||
|
|
<if test="startDate != null">start_date,</if>
|
||
|
|
<if test="planFinishTime != null">plan_finish_time,</if>
|
||
|
|
<if test="realFinishTime != null">real_finish_time,</if>
|
||
|
|
<if test="createBy != null">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="projectId != null">#{projectId},</if>
|
||
|
|
<if test="testEnvironment != null">#{testEnvironment},</if>
|
||
|
|
<if test="testProgress != null">#{testProgress},</if>
|
||
|
|
<if test="projectUserInfo != null">#{projectUserInfo},</if>
|
||
|
|
<if test="startDate != null">#{startDate},</if>
|
||
|
|
<if test="planFinishTime != null">#{planFinishTime},</if>
|
||
|
|
<if test="realFinishTime != null">#{realFinishTime},</if>
|
||
|
|
<if test="createBy != null">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
<insert id="insertBatch">
|
||
|
|
insert into project_poc_info (project_id, test_environment, test_progress, project_user_info, start_date, plan_finish_time, real_finish_time, create_by, create_time) values
|
||
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
||
|
|
(#{item.projectId}, #{item.testEnvironment}, #{item.testProgress}, #{item.projectUserInfo}, #{item.startDate}, #{item.planFinishTime}, #{item.realFinishTime}, #{item.createBy},now())
|
||
|
|
</foreach>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateProjectPocInfo" parameterType="ProjectPocInfo">
|
||
|
|
update project_poc_info
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="projectId != null">project_id = #{projectId},</if>
|
||
|
|
<if test="testEnvironment != null">test_environment = #{testEnvironment},</if>
|
||
|
|
<if test="testProgress != null">test_progress = #{testProgress},</if>
|
||
|
|
<if test="projectUserInfo != null">project_user_info = #{projectUserInfo},</if>
|
||
|
|
<if test="startDate != null">start_date = #{startDate},</if>
|
||
|
|
<if test="planFinishTime != null">plan_finish_time = #{planFinishTime},</if>
|
||
|
|
<if test="realFinishTime != null">real_finish_time = #{realFinishTime},</if>
|
||
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
<update id="updateBatch">
|
||
|
|
<foreach collection="list" item="item" index="index" separator=";">
|
||
|
|
update project_poc_info
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="item.testEnvironment != null">test_environment = #{item.testEnvironment},</if>
|
||
|
|
<if test="item.testProgress != null">test_progress = #{item.testProgress},</if>
|
||
|
|
<if test="item.projectUserInfo != null">project_user_info = #{item.projectUserInfo},</if>
|
||
|
|
<if test="item.startDate != null">start_date = #{item.startDate},</if>
|
||
|
|
<if test="item.planFinishTime != null">plan_finish_time = #{item.planFinishTime},</if>
|
||
|
|
<if test="item.realFinishTime != null">real_finish_time = #{item.realFinishTime},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{item.id}
|
||
|
|
</foreach>
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteProjectPocInfoById" parameterType="Long">
|
||
|
|
delete from project_poc_info where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteProjectPocInfoByIds" parameterType="String">
|
||
|
|
delete from project_poc_info where id in
|
||
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
|
#{id}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
</mapper>
|