|
@@ -0,0 +1,118 @@
|
|
|
+<?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.in.mapper.InSyncInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="InSyncInfo" id="InSyncInfoResult">
|
|
|
+ <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="syncValid" column="SYNC_VALID"/>
|
|
|
+ <result property="costTime" column="COST_TIME"/>
|
|
|
+ <result property="isSucess" column="IS_SUCESS"/>
|
|
|
+ <result property="createTime" column="CREATE_TIME"/>
|
|
|
+ <result property="logMsg" column="LOG_MSG"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectInSyncInfoVo">
|
|
|
+ select INFO_ID,
|
|
|
+ SYNC_TYPE,
|
|
|
+ SYNC_FILE_NAME,
|
|
|
+ SYNC_FILE_MD5,
|
|
|
+ SYNC_FILE_SIZE,
|
|
|
+ SYNC_SORT,
|
|
|
+ SYNC_VALID,
|
|
|
+ COST_TIME,
|
|
|
+ IS_SUCESS,
|
|
|
+ CREATE_TIME,
|
|
|
+ LOG_MSG
|
|
|
+ from in_sync_info
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectInSyncInfoList" parameterType="InSyncInfo" resultMap="InSyncInfoResult">
|
|
|
+ <include refid="selectInSyncInfoVo"/>
|
|
|
+ <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="syncValid != null and syncValid != ''">and SYNC_VALID = #{syncValid}</if>
|
|
|
+ <if test="costTime != null ">and COST_TIME = #{costTime}</if>
|
|
|
+ <if test="isSucess != null and isSucess != ''">and IS_SUCESS = #{isSucess}</if>
|
|
|
+ <if test="createTime != null ">and CREATE_TIME = #{createTime}</if>
|
|
|
+ <if test="logMsg != null and logMsg != ''">and LOG_MSG = #{logMsg}</if>
|
|
|
+ </where>
|
|
|
+ order by CREATE_TIME desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectInSyncInfoByInfoId" parameterType="Long" resultMap="InSyncInfoResult">
|
|
|
+ <include refid="selectInSyncInfoVo"/>
|
|
|
+ where INFO_ID = #{infoId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertInSyncInfo" parameterType="InSyncInfo" useGeneratedKeys="true" keyProperty="infoId">
|
|
|
+ insert into in_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="syncValid != null">SYNC_VALID,</if>
|
|
|
+ <if test="costTime != null">COST_TIME,</if>
|
|
|
+ <if test="isSucess != null">IS_SUCESS,</if>
|
|
|
+ <if test="createTime != null">CREATE_TIME,</if>
|
|
|
+ <if test="logMsg != null">LOG_MSG,</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="syncValid != null">#{syncValid},</if>
|
|
|
+ <if test="costTime != null">#{costTime},</if>
|
|
|
+ <if test="isSucess != null">#{isSucess},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="logMsg != null">#{logMsg},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateInSyncInfo" parameterType="InSyncInfo">
|
|
|
+ update in_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="syncValid != null">SYNC_VALID = #{syncValid},</if>
|
|
|
+ <if test="costTime != null">COST_TIME = #{costTime},</if>
|
|
|
+ <if test="isSucess != null">IS_SUCESS = #{isSucess},</if>
|
|
|
+ <if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
|
|
+ <if test="logMsg != null">LOG_MSG = #{logMsg},</if>
|
|
|
+ </trim>
|
|
|
+ where INFO_ID = #{infoId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteInSyncInfoByInfoId" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from in_sync_info
|
|
|
+ where INFO_ID = #{infoId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteInSyncInfoByInfoIds" parameterType="String">
|
|
|
+ delete from in_sync_info where INFO_ID in
|
|
|
+ <foreach item="infoId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{infoId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|