You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udispssync-java/api-admin/src/main/resources/mybatis/mapper/sync/BasicUploadDao.xml

81 lines
3.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.glxp.sale.admin.dao.sync.BasicUploadDao">
<select id="filterUploadStatus" parameterType="com.glxp.sale.admin.req.sync.BasicUploadRequest"
resultType="com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity">
select *
from basic_upload_status
<where>
<if test="id != '' and id != null">
and id = #{id}
</if>
<if test="taskId != null and taskId != ''">
and taskId = #{taskId}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="type != null">
and `type` = #{type}
</if>
<if test="idDatas != '' and idDatas != null">
and idDatas = #{idDatas}
</if>
<if test="scheduleType != null">
and scheduleType = #{scheduleType}
</if>
</where>
order by updateTime desc
</select>
<insert id="insertUploadStatus" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity">
replace
INTO basic_upload_status(id,taskId,idDatas,status,type,transportType,
updateTime,scheduleType,startTime,endTime,remark,superiorService,subordinateService,cacheFilePath)
values(
#{id},
#{taskId},
#{idDatas},
#{status},
#{type},
#{transportType},
#{updateTime},
#{scheduleType},
#{startTime},
#{endTime},
#{remark},
#{superiorService},
#{subordinateService},#{cacheFilePath}
)
</insert>
<update id="updateUploadStatus" parameterType="com.glxp.sale.admin.entity.sync.BasicUploadStatusEntity">
UPDATE basic_upload_status
<trim prefix="set" suffixOverrides=",">
<if test="idDatas != null">idDatas=#{idDatas},</if>
<if test="status != null">status=#{status},</if>
<if test="type != null">type=#{type},</if>
<if test="transportType != null">transportType=#{transportType},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="scheduleType != null">scheduleType=#{scheduleType},</if>
<if test="startTime != null">startTime=#{startTime},</if>
<if test="endTime != null">endTime=#{endTime},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="subordinateService != null">subordinateService=#{subordinateService},</if>
<if test="superiorService != null">superiorService=#{superiorService},</if>
<if test="cacheFilePath != null">cacheFilePath=#{cacheFilePath},</if>
</trim>
WHERE id = #{id}
</update>
<delete id="deleteById" parameterType="Map">
DELETE
FROM basic_upload_status
WHERE id = #{id}
</delete>
</mapper>