136 lines
6.3 KiB
XML
136 lines
6.3 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.zhwl.statistics.mapper.ZdyExportMapper">
|
|
|
|
<resultMap type="ZdyExport" id="ZdyExportResult">
|
|
<result property="id" column="id"/>
|
|
<result property="type" column="type"/>
|
|
<result property="fileName" column="file_name"/>
|
|
<result property="fileSize" column="file_size"/>
|
|
<result property="fileType" column="file_type"/>
|
|
<result property="importTime" column="import_time"/>
|
|
<result property="process" column="process"/>
|
|
<result property="importStauts" column="import_stauts"/>
|
|
<result property="errorMessage" column="error_message"/>
|
|
<result property="relatedLink" column="related_link"/>
|
|
<result property="startTime" column="start_time"/>
|
|
<result property="endTime" column="end_time"/>
|
|
<result property="spendTime" column="spend_time"/>
|
|
<result property="deptId" column="dept_id"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectZdyExportVo">
|
|
select ze.id,
|
|
ze.type,
|
|
ze.file_name,
|
|
ze.file_size,
|
|
ze.file_type,
|
|
ze.import_time,
|
|
ze.process,
|
|
ze.import_stauts,
|
|
ze.error_message,
|
|
ze.related_link,
|
|
ze.start_time,
|
|
ze.end_time,
|
|
ze.spend_time,
|
|
ze.dept_id
|
|
from zdy_export ze
|
|
</sql>
|
|
|
|
<select id="selectZdyExportList" parameterType="ZdyExport" resultMap="ZdyExportResult">
|
|
<include refid="selectZdyExportVo"/>
|
|
LEFT JOIN sys_dept d ON d.dept_id = ze.dept_id
|
|
<where>
|
|
<if test="startTime != null and endTime != null">
|
|
and ze.import_time between #{startTime} and #{endTime}
|
|
</if>
|
|
<if test="type != null and type != ''">and ze.type = #{type}</if>
|
|
<if test="fileName != null and fileName != ''">and ze.file_name like concat('%', #{fileName}, '%')</if>
|
|
<if test="fileSize != null ">and ze.file_size = #{fileSize}</if>
|
|
<if test="fileType != null and fileType != ''">and ze.file_type = #{fileType}</if>
|
|
<if test="importTime != null ">and ze.import_time = #{importTime}</if>
|
|
<if test="process != null ">and ze.process = #{process}</if>
|
|
<if test="importStauts != null and importStauts != ''">and ze.import_stauts = #{importStauts}</if>
|
|
<if test="errorMessage != null and errorMessage != ''">and ze.error_message = #{errorMessage}</if>
|
|
<if test="relatedLink != null and relatedLink != ''">and ze.related_link = #{relatedLink}</if>
|
|
<if test="spendTime != null ">and ze.spend_time = #{spendTime}</if>
|
|
${params.dataScope}
|
|
</where>
|
|
order by ze.id desc
|
|
</select>
|
|
|
|
<select id="selectZdyExportById" parameterType="Long" resultMap="ZdyExportResult">
|
|
<include refid="selectZdyExportVo"/>
|
|
where ze.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertZdyExport" parameterType="ZdyExport" useGeneratedKeys="true" keyProperty="id">
|
|
insert into zdy_export
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="type != null">type,</if>
|
|
<if test="fileName != null">file_name,</if>
|
|
<if test="fileSize != null">file_size,</if>
|
|
<if test="fileType != null">file_type,</if>
|
|
<if test="importTime != null">import_time,</if>
|
|
<if test="process != null">process,</if>
|
|
<if test="importStauts != null">import_stauts,</if>
|
|
<if test="errorMessage != null">error_message,</if>
|
|
<if test="relatedLink != null">related_link,</if>
|
|
<if test="startTime != null">start_time,</if>
|
|
<if test="endTime != null">end_time,</if>
|
|
<if test="spendTime != null">spend_time,</if>
|
|
<if test="deptId != null">dept_id,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="type != null">#{type},</if>
|
|
<if test="fileName != null">#{fileName},</if>
|
|
<if test="fileSize != null">#{fileSize},</if>
|
|
<if test="fileType != null">#{fileType},</if>
|
|
<if test="importTime != null">#{importTime},</if>
|
|
<if test="process != null">#{process},</if>
|
|
<if test="importStauts != null">#{importStauts},</if>
|
|
<if test="errorMessage != null">#{errorMessage},</if>
|
|
<if test="relatedLink != null">#{relatedLink},</if>
|
|
<if test="startTime != null">#{startTime},</if>
|
|
<if test="endTime != null">#{endTime},</if>
|
|
<if test="spendTime != null">#{spendTime},</if>
|
|
<if test="deptId != null">#{deptId},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZdyExport" parameterType="ZdyExport">
|
|
update zdy_export
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="type != null">type = #{type},</if>
|
|
<if test="fileName != null">file_name = #{fileName},</if>
|
|
<if test="fileSize != null">file_size = #{fileSize},</if>
|
|
<if test="fileType != null">file_type = #{fileType},</if>
|
|
<if test="importTime != null">import_time = #{importTime},</if>
|
|
<if test="process != null">process = #{process},</if>
|
|
<if test="importStauts != null">import_stauts = #{importStauts},</if>
|
|
<if test="errorMessage != null">error_message = #{errorMessage},</if>
|
|
<if test="relatedLink != null">related_link = #{relatedLink},</if>
|
|
<if test="startTime != null">start_time = #{startTime},</if>
|
|
<if test="endTime != null">end_time = #{endTime},</if>
|
|
<if test="spendTime != null">spend_time = #{spendTime},</if>
|
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteZdyExportById" parameterType="Long">
|
|
delete
|
|
from zdy_export
|
|
where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteZdyExportByIds" parameterType="String">
|
|
delete from zdy_export where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|