万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

113 lines
5.8 KiB

<?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.ck.mapper.PictureUploadMapper">
<resultMap type="PictureUpload" id="PictureUploadResult">
<result property="id" column="id" />
<result property="itemCode" column="itemCode" />
<result property="type" column="type" />
<result property="version" column="version" />
<result property="path" column="path" />
<result property="uploadDate" column="uploadDate" />
<result property="uploadMan" column="uploadMan" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
<result property="spare4" column="spare4" />
<result property="spare5" column="spare5" />
<result property="spare6" column="spare6" />
</resultMap>
<sql id="selectPictureUploadVo">
select id, itemCode, type, version, path, uploadDate, uploadMan, spare1, spare2, spare3, spare4, spare5, spare6 from picture_upload
</sql>
<select id="selectPictureUploadList" parameterType="PictureUpload" resultMap="PictureUploadResult">
<include refid="selectPictureUploadVo"/>
<where>
<if test="id != null "> and id like concat('%', #{id}, '%')</if>
<if test="itemCode != null and itemCode != ''"> and itemCode like concat('%', #{itemCode}, '%')</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="version != null and version != ''"> and version like concat('%', #{version}, '%')</if>
<if test="path != null and path != ''"> and path like concat('%', #{path}, '%')</if>
<if test="params.beginUploadDate != null and params.beginUploadDate != '' and params.endUploadDate != null and params.endUploadDate != ''"> and uploadDate between #{params.beginUploadDate} and #{params.endUploadDate}</if>
<if test="uploadMan != null and uploadMan != ''"> and uploadMan like concat('%', #{uploadMan}, '%')</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
<if test="spare4 != null and spare4 != ''"> and spare4 = #{spare4}</if>
<if test="spare5 != null and spare5 != ''"> and spare5 = #{spare5}</if>
<if test="spare6 != null and spare6 != ''"> and spare6 = #{spare6}</if>
</where>
</select>
<select id="selectPictureUploadById" parameterType="Long" resultMap="PictureUploadResult">
<include refid="selectPictureUploadVo"/>
where id = #{id}
</select>
<insert id="insertPictureUpload" parameterType="PictureUpload" useGeneratedKeys="true" keyProperty="id">
insert into picture_upload
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemCode != null">itemCode,</if>
<if test="type != null">type,</if>
<if test="version != null">version,</if>
<if test="path != null">path,</if>
<if test="uploadDate != null">uploadDate,</if>
<if test="uploadMan != null">uploadMan,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
<if test="spare4 != null">spare4,</if>
<if test="spare5 != null">spare5,</if>
<if test="spare6 != null">spare6,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemCode != null">#{itemCode},</if>
<if test="type != null">#{type},</if>
<if test="version != null">#{version},</if>
<if test="path != null">#{path},</if>
<if test="uploadDate != null">#{uploadDate},</if>
<if test="uploadMan != null">#{uploadMan},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
<if test="spare4 != null">#{spare4},</if>
<if test="spare5 != null">#{spare5},</if>
<if test="spare6 != null">#{spare6},</if>
</trim>
</insert>
<update id="updatePictureUpload" parameterType="PictureUpload">
update picture_upload
<trim prefix="SET" suffixOverrides=",">
<if test="itemCode != null">itemCode = #{itemCode},</if>
<if test="type != null">type = #{type},</if>
<if test="version != null">version = #{version},</if>
<if test="path != null">path = #{path},</if>
<if test="uploadDate != null">uploadDate = #{uploadDate},</if>
<if test="uploadMan != null">uploadMan = #{uploadMan},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
<if test="spare4 != null">spare4 = #{spare4},</if>
<if test="spare5 != null">spare5 = #{spare5},</if>
<if test="spare6 != null">spare6 = #{spare6},</if>
</trim>
where id = #{id}
</update>
<delete id="deletePictureUploadById" parameterType="Long">
delete from picture_upload where id = #{id}
</delete>
<delete id="deletePictureUploadByIds" parameterType="String">
delete from picture_upload where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>