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.
79 lines
2.8 KiB
XML
79 lines
2.8 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.api.dao.sync.BasicExportDao">
|
|
|
|
<select id="filterExportStatus" parameterType="com.glxp.api.req.sync.BasicExportStatusRequest"
|
|
resultType="com.glxp.api.entity.sync.BasicExportStatusEntity">
|
|
select * from basic_export_status
|
|
<where>
|
|
<if test="id != null and id != ''">
|
|
AND id LIKE concat('%',#{id},'%')
|
|
</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>
|
|
<if test="syncTime != null and syncTime != ''">
|
|
and #{syncTime} >= startTime and #{syncTime} <= endTime
|
|
</if>
|
|
</where>
|
|
order by updateTime desc
|
|
</select>
|
|
|
|
|
|
<insert id="insertExportStatus" keyProperty="id"
|
|
parameterType="com.glxp.api.entity.sync.BasicExportStatusEntity">
|
|
replace
|
|
INTO basic_export_status(id,idDatas,status,type,updateTime,scheduleType,startTime,endTime,remark)
|
|
values(
|
|
#{id},
|
|
#{idDatas},
|
|
#{status},
|
|
#{type},
|
|
#{updateTime},
|
|
#{scheduleType},
|
|
#{startTime},
|
|
#{endTime},
|
|
#{remark}
|
|
)
|
|
</insert>
|
|
|
|
<update id="updateExportStatus" parameterType="com.glxp.api.entity.sync.BasicExportStatusEntity">
|
|
UPDATE basic_export_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="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>
|
|
</trim>
|
|
WHERE id = #{id}
|
|
</update>
|
|
<delete id="deleteById" parameterType="Map">
|
|
DELETE
|
|
FROM basic_export_status
|
|
WHERE id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteByTime">
|
|
Delete From basic_export_status
|
|
where date(startTime) <= date(DATE_SUB(NOW(),INTERVAL 30 day))
|
|
</delete>
|
|
|
|
<delete id="deleteByDate">
|
|
delete from basic_export_status where date_format(#{date}, '%Y-%m-%d') >= date_format(startTime, '%Y-%m-%d')
|
|
</delete>
|
|
</mapper>
|