|
@@ -0,0 +1,92 @@
|
|
|
+<?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.jjt.out.mapper.OutSyncInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="OutSyncInfo" id="OutSyncInfoResult">
|
|
|
+ <result property="infoId" column="INFO_ID" />
|
|
|
+ <result property="syncType" column="SYNC_TYPE" />
|
|
|
+ <result property="syncFileName" column="SYNC_FILE_NAME" />
|
|
|
+ <result property="syncFileMd5" column="SYNC_FILE_MD5" />
|
|
|
+ <result property="syncFileSize" column="SYNC_FILE_SIZE" />
|
|
|
+ <result property="syncSort" column="SYNC_SORT" />
|
|
|
+ <result property="costTime" column="COST_TIME" />
|
|
|
+ <result property="uploadTime" column="UPLOAD_TIME" />
|
|
|
+ <result property="uploadStatus" column="UPLOAD_STATUS" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectOutSyncInfoVo">
|
|
|
+ select INFO_ID, SYNC_TYPE, SYNC_FILE_NAME, SYNC_FILE_MD5, SYNC_FILE_SIZE, SYNC_SORT, COST_TIME, UPLOAD_TIME, UPLOAD_STATUS from out_sync_info
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectOutSyncInfoList" parameterType="OutSyncInfo" resultMap="OutSyncInfoResult">
|
|
|
+ <include refid="selectOutSyncInfoVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="syncType != null and syncType != ''"> and SYNC_TYPE = #{syncType}</if>
|
|
|
+ <if test="syncFileName != null and syncFileName != ''"> and SYNC_FILE_NAME like concat('%', #{syncFileName}, '%')</if>
|
|
|
+ <if test="syncFileMd5 != null and syncFileMd5 != ''"> and SYNC_FILE_MD5 = #{syncFileMd5}</if>
|
|
|
+ <if test="syncFileSize != null "> and SYNC_FILE_SIZE = #{syncFileSize}</if>
|
|
|
+ <if test="syncSort != null "> and SYNC_SORT = #{syncSort}</if>
|
|
|
+ <if test="costTime != null "> and COST_TIME = #{costTime}</if>
|
|
|
+ <if test="uploadTime != null "> and UPLOAD_TIME = #{uploadTime}</if>
|
|
|
+ <if test="uploadStatus != null and uploadStatus != ''"> and UPLOAD_STATUS = #{uploadStatus}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectOutSyncInfoByInfoId" parameterType="Long" resultMap="OutSyncInfoResult">
|
|
|
+ <include refid="selectOutSyncInfoVo"/>
|
|
|
+ where INFO_ID = #{infoId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertOutSyncInfo" parameterType="OutSyncInfo" useGeneratedKeys="true" keyProperty="infoId">
|
|
|
+ insert into out_sync_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="syncType != null">SYNC_TYPE,</if>
|
|
|
+ <if test="syncFileName != null">SYNC_FILE_NAME,</if>
|
|
|
+ <if test="syncFileMd5 != null">SYNC_FILE_MD5,</if>
|
|
|
+ <if test="syncFileSize != null">SYNC_FILE_SIZE,</if>
|
|
|
+ <if test="syncSort != null">SYNC_SORT,</if>
|
|
|
+ <if test="costTime != null">COST_TIME,</if>
|
|
|
+ <if test="uploadTime != null">UPLOAD_TIME,</if>
|
|
|
+ <if test="uploadStatus != null">UPLOAD_STATUS,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="syncType != null">#{syncType},</if>
|
|
|
+ <if test="syncFileName != null">#{syncFileName},</if>
|
|
|
+ <if test="syncFileMd5 != null">#{syncFileMd5},</if>
|
|
|
+ <if test="syncFileSize != null">#{syncFileSize},</if>
|
|
|
+ <if test="syncSort != null">#{syncSort},</if>
|
|
|
+ <if test="costTime != null">#{costTime},</if>
|
|
|
+ <if test="uploadTime != null">#{uploadTime},</if>
|
|
|
+ <if test="uploadStatus != null">#{uploadStatus},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateOutSyncInfo" parameterType="OutSyncInfo">
|
|
|
+ update out_sync_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="syncType != null">SYNC_TYPE = #{syncType},</if>
|
|
|
+ <if test="syncFileName != null">SYNC_FILE_NAME = #{syncFileName},</if>
|
|
|
+ <if test="syncFileMd5 != null">SYNC_FILE_MD5 = #{syncFileMd5},</if>
|
|
|
+ <if test="syncFileSize != null">SYNC_FILE_SIZE = #{syncFileSize},</if>
|
|
|
+ <if test="syncSort != null">SYNC_SORT = #{syncSort},</if>
|
|
|
+ <if test="costTime != null">COST_TIME = #{costTime},</if>
|
|
|
+ <if test="uploadTime != null">UPLOAD_TIME = #{uploadTime},</if>
|
|
|
+ <if test="uploadStatus != null">UPLOAD_STATUS = #{uploadStatus},</if>
|
|
|
+ </trim>
|
|
|
+ where INFO_ID = #{infoId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteOutSyncInfoByInfoId" parameterType="Long">
|
|
|
+ delete from out_sync_info where INFO_ID = #{infoId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteOutSyncInfoByInfoIds" parameterType="String">
|
|
|
+ delete from out_sync_info where INFO_ID in
|
|
|
+ <foreach item="infoId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{infoId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|