unis_sip/ruoyi-sip/src/main/resources/mapper/sip/ProjectPocInfoMapper.xml

192 lines
11 KiB
XML
Raw Normal View History

<?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="serverConfig" column="server_config" />
<result property="terminalConfig" column="terminal_config" />
<result property="operateSystem" column="operate_system" />
<result property="vdiVersion" column="vdi_version" />
<result property="processPerson" column="process_person" />
<result property="processPhone" column="process_phone" />
<result property="handlePerson" column="handle_person" />
<result property="handlePhone" column="handle_phone" />
<result property="hzInterfacePerson" column="hz_interface_person" />
<result property="hzInterfacePhone" column="hz_interface_phone" />
<result property="startDate" column="start_date" />
<result property="h3cPerson" column="h3c_person" />
<result property="h3cPhone" column="h3c_phone" />
<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>
<resultMap id="ProjectPocInfoProjectPocInfoDetailResult" type="ProjectPocInfo" extends="ProjectPocInfoResult">
<collection property="projectPocInfoDetailList" ofType="ProjectPocInfoDetail" column="id" select="selectProjectPocInfoDetailList" />
</resultMap>
<resultMap type="ProjectPocInfoDetail" id="ProjectPocInfoDetailResult">
<result property="id" column="id" />
<result property="pocId" column="poc_id" />
<result property="testProgress" column="test_progress" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectProjectPocInfoVo">
select id, project_id, server_config, terminal_config, operate_system, vdi_version, process_person, process_phone, handle_person, handle_phone, hz_interface_person, hz_interface_phone, start_date, h3c_person, h3c_phone, 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="serverConfig != null and serverConfig != ''"> and server_config = #{serverConfig}</if>
<if test="terminalConfig != null and terminalConfig != ''"> and terminal_config = #{terminalConfig}</if>
<if test="operateSystem != null and operateSystem != ''"> and operate_system = #{operateSystem}</if>
<if test="vdiVersion != null and vdiVersion != ''"> and vdi_version = #{vdiVersion}</if>
<if test="processPerson != null and processPerson != ''"> and process_person = #{processPerson}</if>
<if test="processPhone != null and processPhone != ''"> and process_phone = #{processPhone}</if>
<if test="handlePerson != null and handlePerson != ''"> and handle_person = #{handlePerson}</if>
<if test="handlePhone != null and handlePhone != ''"> and handle_phone = #{handlePhone}</if>
<if test="hzInterfacePerson != null and hzInterfacePerson != ''"> and hz_interface_person = #{hzInterfacePerson}</if>
<if test="hzInterfacePhone != null and hzInterfacePhone != ''"> and hz_interface_phone = #{hzInterfacePhone}</if>
<if test="startDate != null "> and start_date = #{startDate}</if>
<if test="h3cPerson != null and h3cPerson != ''"> and h3c_person = #{h3cPerson}</if>
<if test="h3cPhone != null and h3cPhone != ''"> and h3c_phone = #{h3cPhone}</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="ProjectPocInfoProjectPocInfoDetailResult">
select id, project_id, server_config, terminal_config, operate_system, vdi_version, process_person, process_phone, handle_person, handle_phone, hz_interface_person, hz_interface_phone, start_date, h3c_person, h3c_phone, plan_finish_time, real_finish_time, create_by, create_time
from project_poc_info
where id = #{id}
</select>
<select id="selectProjectPocInfoDetailList" resultMap="ProjectPocInfoDetailResult">
select t1.id, t1.poc_id, t1.test_progress, t1.create_by, t1.create_time,t2.user_name as create_by_name
from project_poc_info_detail t1
left join sys_user t2 on t1.create_by = t2.user_id
where t1.poc_id = #{poc_id}
</select>
<select id="listByProjectId" resultMap="ProjectPocInfoProjectPocInfoDetailResult">
<include refid="selectProjectPocInfoVo"/>
where project_id in
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item}
</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="serverConfig != null">server_config,</if>
<if test="terminalConfig != null">terminal_config,</if>
<if test="operateSystem != null">operate_system,</if>
<if test="vdiVersion != null">vdi_version,</if>
<if test="processPerson != null">process_person,</if>
<if test="processPhone != null">process_phone,</if>
<if test="handlePerson != null">handle_person,</if>
<if test="handlePhone != null">handle_phone,</if>
<if test="hzInterfacePerson != null">hz_interface_person,</if>
<if test="hzInterfacePhone != null">hz_interface_phone,</if>
<if test="startDate != null">start_date,</if>
<if test="h3cPerson != null">h3c_person,</if>
<if test="h3cPhone != null">h3c_phone,</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="serverConfig != null">#{serverConfig},</if>
<if test="terminalConfig != null">#{terminalConfig},</if>
<if test="operateSystem != null">#{operateSystem},</if>
<if test="vdiVersion != null">#{vdiVersion},</if>
<if test="processPerson != null">#{processPerson},</if>
<if test="processPhone != null">#{processPhone},</if>
<if test="handlePerson != null">#{handlePerson},</if>
<if test="handlePhone != null">#{handlePhone},</if>
<if test="hzInterfacePerson != null">#{hzInterfacePerson},</if>
<if test="hzInterfacePhone != null">#{hzInterfacePhone},</if>
<if test="startDate != null">#{startDate},</if>
<if test="h3cPerson != null">#{h3cPerson},</if>
<if test="h3cPhone != null">#{h3cPhone},</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>
<update id="updateProjectPocInfo" parameterType="ProjectPocInfo">
update project_poc_info
<trim prefix="SET" suffixOverrides=",">
<if test="projectId != null">project_id = #{projectId},</if>
<if test="serverConfig != null">server_config = #{serverConfig},</if>
<if test="terminalConfig != null">terminal_config = #{terminalConfig},</if>
<if test="operateSystem != null">operate_system = #{operateSystem},</if>
<if test="vdiVersion != null">vdi_version = #{vdiVersion},</if>
<if test="processPerson != null">process_person = #{processPerson},</if>
<if test="processPhone != null">process_phone = #{processPhone},</if>
<if test="handlePerson != null">handle_person = #{handlePerson},</if>
<if test="handlePhone != null">handle_phone = #{handlePhone},</if>
<if test="hzInterfacePerson != null">hz_interface_person = #{hzInterfacePerson},</if>
<if test="hzInterfacePhone != null">hz_interface_phone = #{hzInterfacePhone},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="h3cPerson != null">h3c_person = #{h3cPerson},</if>
<if test="h3cPhone != null">h3c_phone = #{h3cPhone},</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="updateBatchProjectPocInfoDetail">
<foreach collection="list" item="item" close=";">
update project_poc_info_detail
set test_progress = #{item.testProgress}
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>
<delete id="deleteProjectPocInfoDetailByPocIds" parameterType="String">
delete from project_poc_info_detail where poc_id in
<foreach item="pocId" collection="array" open="(" separator="," close=")">
#{pocId}
</foreach>
</delete>
<delete id="deleteProjectPocInfoDetailByPocId" parameterType="Long">
delete from project_poc_info_detail where poc_id = #{pocId}
</delete>
<insert id="batchProjectPocInfoDetail">
insert into project_poc_info_detail( id, poc_id, test_progress, create_by, create_time) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.pocId}, #{item.testProgress}, #{item.createBy}, #{item.createTime})
</foreach>
</insert>
</mapper>