<?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.processFile.mapper.BsProcessFileMapper">
|
|
<resultMap type="BsProcessFile" id="BsProcessFileResult">
|
<result property="id" column="id" />
|
<result property="productCode" column="product_code" />
|
<result property="productName" column="product_name" />
|
<result property="processesCode" column="processes_code" />
|
<result property="processesName" column="processes_name" />
|
<result property="fileCode" column="file_code" />
|
<result property="fileName" column="file_name" />
|
<result property="fileAddress" column="file_address" />
|
<result property="status" column="status" />
|
<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="spareField1" column="spare_field_1" />
|
<result property="spareField2" column="spare_field_2" />
|
<result property="spareField3" column="spare_field_3" />
|
<result property="spareField4" column="spare_field_4" />
|
<result property="remarks" column="remarks" />
|
</resultMap>
|
|
<sql id="selectBsProcessFileVo">
|
select id, product_code, product_name, processes_code, processes_name, file_code, file_name, file_address, status, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4, remarks from bs_process_file
|
</sql>
|
|
<select id="selectBsProcessFileList" parameterType="BsProcessFile" resultMap="BsProcessFileResult">
|
<include refid="selectBsProcessFileVo"/>
|
<where>
|
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
<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="fileCode != null and fileCode != ''"> and file_code = #{fileCode}</if>
|
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
<if test="fileAddress != null and fileAddress != ''"> and file_address = #{fileAddress}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if>
|
<if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if>
|
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
</where>
|
</select>
|
|
<select id="selectBsProcessFileById" parameterType="Long" resultMap="BsProcessFileResult">
|
<include refid="selectBsProcessFileVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertBsProcessFile" parameterType="BsProcessFile" useGeneratedKeys="true" keyProperty="id">
|
insert into bs_process_file
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="productCode != null">product_code,</if>
|
<if test="productName != null">product_name,</if>
|
<if test="processesCode != null">processes_code,</if>
|
<if test="processesName != null">processes_name,</if>
|
<if test="fileCode != null">file_code,</if>
|
<if test="fileName != null">file_name,</if>
|
<if test="fileAddress != null">file_address,</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="spareField1 != null">spare_field_1,</if>
|
<if test="spareField2 != null">spare_field_2,</if>
|
<if test="spareField3 != null">spare_field_3,</if>
|
<if test="spareField4 != null">spare_field_4,</if>
|
<if test="remarks != null">remarks,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="productCode != null">#{productCode},</if>
|
<if test="productName != null">#{productName},</if>
|
<if test="processesCode != null">#{processesCode},</if>
|
<if test="processesName != null">#{processesName},</if>
|
<if test="fileCode != null">#{fileCode},</if>
|
<if test="fileName != null">#{fileName},</if>
|
<if test="fileAddress != null">#{fileAddress},</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="spareField1 != null">#{spareField1},</if>
|
<if test="spareField2 != null">#{spareField2},</if>
|
<if test="spareField3 != null">#{spareField3},</if>
|
<if test="spareField4 != null">#{spareField4},</if>
|
<if test="remarks != null">#{remarks},</if>
|
</trim>
|
</insert>
|
|
<update id="updateBsProcessFile" parameterType="BsProcessFile">
|
update bs_process_file
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="productCode != null">product_code = #{productCode},</if>
|
<if test="productName != null">product_name = #{productName},</if>
|
<if test="processesCode != null">processes_code = #{processesCode},</if>
|
<if test="processesName != null">processes_name = #{processesName},</if>
|
<if test="fileCode != null">file_code = #{fileCode},</if>
|
<if test="fileName != null">file_name = #{fileName},</if>
|
<if test="fileAddress != null">file_address = #{fileAddress},</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="spareField1 != null">spare_field_1 = #{spareField1},</if>
|
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
|
<if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
|
<if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
|
<if test="remarks != null">remarks = #{remarks},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteBsProcessFileById" parameterType="Long">
|
delete from bs_process_file where id = #{id}
|
</delete>
|
|
<delete id="deleteBsProcessFileByIds" parameterType="String">
|
delete from bs_process_file where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|