136 lines
8.0 KiB
XML
136 lines
8.0 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.xdadan.erp.emis.mapper.EmisWriteoffApplyImageMapper">
|
|
|
|
<resultMap type="EmisWriteoffApplyImage" id="EmisWriteoffApplyImageResult">
|
|
<result property="id" column="id" />
|
|
<result property="applyId" column="apply_id" />
|
|
<result property="applyNo" column="apply_no" />
|
|
<result property="imageName" column="image_name" />
|
|
<result property="imagePath" column="image_path" />
|
|
<result property="imageSize" column="image_size" />
|
|
<result property="imageType" column="image_type" />
|
|
<result property="uploadDate" column="upload_date" />
|
|
<result property="uploadManCode" column="upload_man_code" />
|
|
<result property="uploadManName" column="upload_man_name" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
|
|
<sql id="selectEmisWriteoffApplyImageVo">
|
|
select id, apply_id, apply_no, image_name, image_path, image_size, image_type, upload_date, upload_man_code, upload_man_name, create_by, create_time, update_by, update_time, remark from emis_writeoff_apply_image
|
|
</sql>
|
|
|
|
<select id="selectEmisWriteoffApplyImageList" parameterType="EmisWriteoffApplyImage" resultMap="EmisWriteoffApplyImageResult">
|
|
<include refid="selectEmisWriteoffApplyImageVo"/>
|
|
<where>
|
|
<if test="applyId != null "> and apply_id = #{applyId}</if>
|
|
<if test="applyNo != null and applyNo != ''"> and apply_no = #{applyNo}</if>
|
|
<if test="imageName != null and imageName != ''"> and image_name like concat('%', #{imageName}, '%')</if>
|
|
<if test="imagePath != null and imagePath != ''"> and image_path like concat('%', #{imagePath}, '%')</if>
|
|
<if test="imageSize != null "> and image_size = #{imageSize}</if>
|
|
<if test="imageType != null and imageType != ''"> and image_type = #{imageType}</if>
|
|
<if test="uploadDate != null "> and upload_date = #{uploadDate}</if>
|
|
<if test="uploadManCode != null and uploadManCode != ''"> and upload_man_code = #{uploadManCode}</if>
|
|
<if test="uploadManName != null and uploadManName != ''"> and upload_man_name like concat('%', #{uploadManName}, '%')</if>
|
|
</where>
|
|
order by upload_date desc
|
|
</select>
|
|
|
|
<select id="selectEmisWriteoffApplyImageById" parameterType="Long" resultMap="EmisWriteoffApplyImageResult">
|
|
<include refid="selectEmisWriteoffApplyImageVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="selectEmisWriteoffApplyImageListByApplyId" parameterType="Long" resultMap="EmisWriteoffApplyImageResult">
|
|
<include refid="selectEmisWriteoffApplyImageVo"/>
|
|
where apply_id = #{applyId}
|
|
order by upload_date desc
|
|
</select>
|
|
|
|
<insert id="insertEmisWriteoffApplyImage" parameterType="EmisWriteoffApplyImage" useGeneratedKeys="true" keyProperty="id">
|
|
insert into emis_writeoff_apply_image
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="applyId != null">apply_id,</if>
|
|
<if test="applyNo != null and applyNo != ''">apply_no,</if>
|
|
<if test="imageName != null and imageName != ''">image_name,</if>
|
|
<if test="imagePath != null and imagePath != ''">image_path,</if>
|
|
<if test="imageSize != null">image_size,</if>
|
|
<if test="imageType != null and imageType != ''">image_type,</if>
|
|
<if test="uploadDate != null">upload_date,</if>
|
|
<if test="uploadManCode != null and uploadManCode != ''">upload_man_code,</if>
|
|
<if test="uploadManName != null and uploadManName != ''">upload_man_name,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="applyId != null">#{applyId},</if>
|
|
<if test="applyNo != null and applyNo != ''">#{applyNo},</if>
|
|
<if test="imageName != null and imageName != ''">#{imageName},</if>
|
|
<if test="imagePath != null and imagePath != ''">#{imagePath},</if>
|
|
<if test="imageSize != null">#{imageSize},</if>
|
|
<if test="imageType != null and imageType != ''">#{imageType},</if>
|
|
<if test="uploadDate != null">#{uploadDate},</if>
|
|
<if test="uploadManCode != null and uploadManCode != ''">#{uploadManCode},</if>
|
|
<if test="uploadManName != null and uploadManName != ''">#{uploadManName},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<insert id="insertEmisWriteoffApplyImageBatch" parameterType="java.util.List">
|
|
insert into emis_writeoff_apply_image (apply_id, apply_no, image_name, image_path, image_size, image_type, upload_date, upload_man_code, upload_man_name, create_by, create_time, update_by, update_time, remark)
|
|
values
|
|
<foreach collection="list" item="item" separator=",">
|
|
(#{item.applyId}, #{item.applyNo}, #{item.imageName}, #{item.imagePath}, #{item.imageSize}, #{item.imageType}, #{item.uploadDate}, #{item.uploadManCode}, #{item.uploadManName}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
|
</foreach>
|
|
</insert>
|
|
|
|
<update id="updateEmisWriteoffApplyImage" parameterType="EmisWriteoffApplyImage">
|
|
update emis_writeoff_apply_image
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="applyId != null">apply_id = #{applyId},</if>
|
|
<if test="applyNo != null and applyNo != ''">apply_no = #{applyNo},</if>
|
|
<if test="imageName != null and imageName != ''">image_name = #{imageName},</if>
|
|
<if test="imagePath != null and imagePath != ''">image_path = #{imagePath},</if>
|
|
<if test="imageSize != null">image_size = #{imageSize},</if>
|
|
<if test="imageType != null and imageType != ''">image_type = #{imageType},</if>
|
|
<if test="uploadDate != null">upload_date = #{uploadDate},</if>
|
|
<if test="uploadManCode != null and uploadManCode != ''">upload_man_code = #{uploadManCode},</if>
|
|
<if test="uploadManName != null and uploadManName != ''">upload_man_name = #{uploadManName},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteEmisWriteoffApplyImageById" parameterType="Long">
|
|
delete from emis_writeoff_apply_image where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisWriteoffApplyImageByApplyId" parameterType="Long">
|
|
delete from emis_writeoff_apply_image where apply_id = #{applyId}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisWriteoffApplyImageByIds" parameterType="String">
|
|
delete from emis_writeoff_apply_image where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper>
|
|
|