replace INTO basic_export_status(id, idDatas, status, type, updateTime, scheduleType, startTime, endTime, remark, cacheFilePath) values (#{id}, #{idDatas}, #{status}, #{type}, #{updateTime}, #{scheduleType}, #{startTime}, #{endTime}, #{remark}, #{cacheFilePath}) UPDATE basic_export_status idDatas=#{idDatas}, status=#{status}, type=#{type}, updateTime=#{updateTime}, scheduleType=#{scheduleType}, startTime=#{startTime}, endTime=#{endTime}, remark=#{remark}, cacheFilePath=#{cacheFilePath}, WHERE id = #{id} DELETE FROM basic_export_status WHERE id = #{id} Delete From basic_export_status where date(startTime) <= date(DATE_SUB(NOW(), INTERVAL 30 day)) delete from basic_export_status where date_format(#{date}, '%Y-%m-%d') >= date_format(startTime, '%Y-%m-%d')