dengzedong
5 天以前 f1fe397df175a7ee809ea28530419116af84af28
提交 | 用户 | 时间
7fd198 1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
4
5 <mapper namespace="com.iailab.module.model.mcs.pre.dao.MmItemResultDao">
6
7     <delete id="deletePredictValue" parameterType="map">
8         DELETE
9         FROM ${TABLENAME}
10         WHERE outputid = #{OUTPUTID}
11           AND datatime
12             BETWEEN #{STARTTIME}
13             AND #{ENDTIME}
14     </delete>
15
16     <insert id="savePredictValue" parameterType="map">
17         INSERT INTO ${TABLENAME}
18         (id,outputid,datatime,datavalue)
19         VALUES
20         <foreach item="item" collection="list" separator=",">
69bd5e 21             (#{item.id},#{item.outputid},#{item.datatime},#{item.datavalue})
7fd198 22         </foreach>
23     </insert>
24
25     <insert id="savePredictJsonValue" parameterType="map">
26         INSERT INTO ${TABLENAME}
27             (id,outputid,predicttime,jsonvalue,cumulant)
28         VALUES (#{entity.id},#{entity.outputid},#{entity.predicttime},#{entity.jsonvalue},#{entity.cumulant})
29     </insert>
30
90a149 31     <insert id="saveOrUpdateItemResult" parameterType="com.iailab.module.model.mcs.pre.entity.MmItemResultEntity">
D 32         INSERT INTO t_mm_item_result (id,outputid, datatime, datavalue) VALUES
33         <foreach item="item" collection="list" separator=",">
34             (#{item.id},#{item.outputid},#{item.datatime},#{item.datavalue})
35         </foreach>
36             ON DUPLICATE KEY UPDATE datavalue = VALUES(datavalue)
37     </insert>
38
7fd198 39
40 </mapper>