<?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.jcdm.main.bs.processes.mapper.BsProcessesInfoMapper">
|
|
<resultMap type="BsProcessesInfo" id="BsProcessesInfoResult">
|
<result property="id" column="id" />
|
<result property="processesCode" column="processes_code" />
|
<result property="processesName" column="processes_name" />
|
<result property="processesType" column="processes_type" />
|
<result property="preparationTime" column="preparation_time" />
|
<result property="productiveTime" column="productive_time" />
|
<result property="status" column="status" />
|
<result property="spareField1" column="spare_field1" />
|
<result property="spareField2" column="spare_field2" />
|
<result property="spareField3" column="spare_field3" />
|
<result property="spareField4" column="spare_field4" />
|
<result property="createUser" column="create_user" />
|
<result property="createTime" column="create_time" />
|
<result property="updateUser" column="update_user" />
|
<result property="updateTime" column="update_time" />
|
<result property="remarks" column="remarks" />
|
</resultMap>
|
|
<sql id="selectBsProcessesInfoVo">
|
select id, processes_code, processes_name, processes_type, preparation_time, productive_time, status, spare_field1, spare_field2, spare_field3, spare_field4, create_user, create_time, update_user, update_time, remarks from bs_processes_info
|
</sql>
|
|
<select id="selectBsProcessesInfoList" parameterType="BsProcessesInfo" resultMap="BsProcessesInfoResult">
|
<include refid="selectBsProcessesInfoVo"/>
|
<where>
|
<if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if>
|
<if test="processesName != null and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
|
<if test="processesType != null and processesType != ''"> and processes_type like concat('%', #{processesType}, '%')</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
</where>
|
</select>
|
|
<select id="selectBsProcessesInfoById" parameterType="Long" resultMap="BsProcessesInfoResult">
|
<include refid="selectBsProcessesInfoVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertBsProcessesInfo" parameterType="BsProcessesInfo">
|
insert into bs_processes_info
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="processesCode != null and processesCode != ''">processes_code,</if>
|
<if test="processesName != null">processes_name,</if>
|
<if test="processesType != null and processesType != ''">processes_type,</if>
|
<if test="preparationTime != null">preparation_time,</if>
|
<if test="productiveTime != null">productive_time,</if>
|
<if test="status != null">status,</if>
|
<if test="createUser != null">create_user,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateUser != null">update_user,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="remarks != null">remarks,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="processesCode != null and processesCode != ''">#{processesCode},</if>
|
<if test="processesName != null">#{processesName},</if>
|
<if test="processesType != null and processesType != ''">#{processesType},</if>
|
<if test="preparationTime != null">#{preparationTime},</if>
|
<if test="productiveTime != null">#{productiveTime},</if>
|
<if test="status != null">#{status},</if>
|
<if test="createUser != null">#{createUser},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateUser != null">#{updateUser},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="remarks != null">#{remarks},</if>
|
</trim>
|
</insert>
|
|
<update id="updateBsProcessesInfo" parameterType="BsProcessesInfo">
|
update bs_processes_info
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="processesCode != null and processesCode != ''">processes_code = #{processesCode},</if>
|
<if test="processesName != null">processes_name = #{processesName},</if>
|
<if test="processesType != null and processesType != ''">processes_type = #{processesType},</if>
|
<if test="preparationTime != null">preparation_time = #{preparationTime},</if>
|
<if test="productiveTime != null">productive_time = #{productiveTime},</if>
|
<if test="status != null">status = #{status},</if>
|
<if test="createUser != null">create_user = #{createUser},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateUser != null">update_user = #{updateUser},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="remarks != null">remarks = #{remarks},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteBsProcessesInfoById" parameterType="Long">
|
delete from bs_processes_info where id = #{id}
|
</delete>
|
|
<delete id="deleteBsProcessesInfoByIds" parameterType="String">
|
delete from bs_processes_info where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|