DELETE
FROM ${TABLENAME}
WHERE outputid = #{OUTPUTID}
AND datatime
BETWEEN #{STARTTIME}
AND #{ENDTIME}
INSERT INTO ${TABLENAME}
(id,outputid,datatime,datavalue)
VALUES
(#{item.id},#{item.outputid},#{item.datatime},#{item.datavalue})
INSERT INTO ${TABLENAME}
(id,outputid,predicttime,jsonvalue,cumulant)
VALUES (#{entity.id},#{entity.outputid},#{entity.predicttime},#{entity.jsonvalue},#{entity.cumulant})
INSERT INTO t_mm_item_result (id,outputid, datatime, datavalue) VALUES
(#{item.id},#{item.outputid},#{item.datatime},#{item.datavalue})
ON DUPLICATE KEY UPDATE datavalue = VALUES(datavalue)