提交 1665582f 编写于 作者: zc's avatar zc

update:pgsql数据库存储模式兼容

上级 a153429a
......@@ -24,10 +24,24 @@
#{item.domainsField},#{item.timeField}, #{item.ext1Field}, #{item.ext2Field},#{item.businessCat},#{item.systemId} )
</foreach>
ON DUPLICATE KEY UPDATE
updatedate=now(),retvalue=values(retValue), metricField=values(metricField),domainsField=values(domainsField),domainsField=values(domainsField),
updatedate=now(),retvalue=values(retValue), metricField=values(metricField),domainsField=values(domainsField),
ext1Field=values(ext1Field),ext2Field=values(ext2Field), businessCat=values(businessCat)
</insert>
<insert id="replaceBatch" parameterType="java.util.List" databaseId="postgresql">
INSERT INTO ${resultTableName}
(ru_execresultid,ru_execresultname, createdate, updatedate, ruleid, rulename, retvalue, keyvaluefield,dimfield, metricfield,domainsfield,timefield,ext1field,ext2field, businesscat , systemid )
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.id}, #{item.name}, now(), now(), #{item.ruleId}, #{item.ruleName}, #{item.retValue}, #{item.keyValueField}, #{item.dimField}, #{item.metricField},
#{item.domainsField},#{item.timeField}, #{item.ext1Field}, #{item.ext2Field},#{item.businessCat},#{item.systemId} )
</foreach>
ON conflict(ru_execresultid) DO UPDATE set
updatedate=current_timestamp, retvalue=excluded.retValue, metricfield=excluded.metricField, domainsfield=excluded.domainsField,
ext1field=excluded.ext1Field,ext2field=excluded.ext2Field, businesscat=excluded.businessCat
</insert>
<!--t1.BUSINESSCAT, t1.CREATEDATE, t1.DIMFIELD, t1.DOMAINSFIELD, t1.EXT1FIELD, t1.EXT2FIELD, t1.KEYVALUEFIELD, t1.METRICFIELD,
t1.RETVALUE, t1.RULEID, t1.RULENAME, t1.RU_EXECRESULTID, t1.RU_EXECRESULTNAME, t1.SYSTEMID, t1.TIMEFIELD, t1.UPDATEDATE-->
<insert id="replaceBatch" parameterType="java.util.List" databaseId="oracle">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册