|
@@ -1,44 +1,56 @@
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
<!DOCTYPE mapper
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.jjt.out.mapper.OutSyncInfoMapper">
|
|
<mapper namespace="com.jjt.out.mapper.OutSyncInfoMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="OutSyncInfo" id="OutSyncInfoResult">
|
|
<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" />
|
|
|
|
|
|
+ <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>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectOutSyncInfoVo">
|
|
<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
|
|
|
|
|
|
+ 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>
|
|
</sql>
|
|
|
|
|
|
<select id="selectOutSyncInfoList" parameterType="OutSyncInfo" resultMap="OutSyncInfoResult">
|
|
<select id="selectOutSyncInfoList" parameterType="OutSyncInfo" resultMap="OutSyncInfoResult">
|
|
<include refid="selectOutSyncInfoVo"/>
|
|
<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>
|
|
|
|
+ <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>
|
|
</where>
|
|
|
|
+ order by UPLOAD_TIME desc
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectOutSyncInfoByInfoId" parameterType="Long" resultMap="OutSyncInfoResult">
|
|
<select id="selectOutSyncInfoByInfoId" parameterType="Long" resultMap="OutSyncInfoResult">
|
|
<include refid="selectOutSyncInfoVo"/>
|
|
<include refid="selectOutSyncInfoVo"/>
|
|
where INFO_ID = #{infoId}
|
|
where INFO_ID = #{infoId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertOutSyncInfo" parameterType="OutSyncInfo" useGeneratedKeys="true" keyProperty="infoId">
|
|
<insert id="insertOutSyncInfo" parameterType="OutSyncInfo" useGeneratedKeys="true" keyProperty="infoId">
|
|
insert into out_sync_info
|
|
insert into out_sync_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -50,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="costTime != null">COST_TIME,</if>
|
|
<if test="costTime != null">COST_TIME,</if>
|
|
<if test="uploadTime != null">UPLOAD_TIME,</if>
|
|
<if test="uploadTime != null">UPLOAD_TIME,</if>
|
|
<if test="uploadStatus != null">UPLOAD_STATUS,</if>
|
|
<if test="uploadStatus != null">UPLOAD_STATUS,</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="syncType != null">#{syncType},</if>
|
|
<if test="syncType != null">#{syncType},</if>
|
|
<if test="syncFileName != null">#{syncFileName},</if>
|
|
<if test="syncFileName != null">#{syncFileName},</if>
|
|
@@ -60,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="costTime != null">#{costTime},</if>
|
|
<if test="costTime != null">#{costTime},</if>
|
|
<if test="uploadTime != null">#{uploadTime},</if>
|
|
<if test="uploadTime != null">#{uploadTime},</if>
|
|
<if test="uploadStatus != null">#{uploadStatus},</if>
|
|
<if test="uploadStatus != null">#{uploadStatus},</if>
|
|
- </trim>
|
|
|
|
|
|
+ </trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<update id="updateOutSyncInfo" parameterType="OutSyncInfo">
|
|
<update id="updateOutSyncInfo" parameterType="OutSyncInfo">
|
|
@@ -79,11 +91,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<delete id="deleteOutSyncInfoByInfoId" parameterType="Long">
|
|
<delete id="deleteOutSyncInfoByInfoId" parameterType="Long">
|
|
- delete from out_sync_info where INFO_ID = #{infoId}
|
|
|
|
|
|
+ delete
|
|
|
|
+ from out_sync_info
|
|
|
|
+ where INFO_ID = #{infoId}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteOutSyncInfoByInfoIds" parameterType="String">
|
|
<delete id="deleteOutSyncInfoByInfoIds" parameterType="String">
|
|
- delete from out_sync_info where INFO_ID in
|
|
|
|
|
|
+ delete from out_sync_info where INFO_ID in
|
|
<foreach item="infoId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="infoId" collection="array" open="(" separator="," close=")">
|
|
#{infoId}
|
|
#{infoId}
|
|
</foreach>
|
|
</foreach>
|