|
@@ -15,20 +15,18 @@
|
|
|
<insert id="singleInsert" >
|
|
|
insert into alarmcount (id, alarmdate, snapid, count)
|
|
|
values
|
|
|
- (#{item.id}, #{item.alarmdate}, #{item.snapId}, #{item.count})
|
|
|
+ (#{item.id}, cast(#{item.alarmDate} as timestamp), #{item.snapId}, #{item.count})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="false">
|
|
|
insert into alarmcount ( ID, alarmdate, snapid, count,time )
|
|
|
<foreach collection="list" item="item" index="index" separator="union all" >
|
|
|
( select
|
|
|
- #{item.id}, #{item.alarmDate}, #{item.snapId}, #{item.count} ,#{item.time}
|
|
|
- from dual )
|
|
|
+ #{item.id}, cast(#{item.alarmDate} as timestamp), #{item.snapId}, #{item.count} ,#{item.time}
|
|
|
+ )
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<select id="selectAlarmHistoryBySnapid" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.schedule.entity.AlarmHistory" >
|
|
|
select * from ${alarmhistory} where snapid = #{snapid}
|
|
|
and alerttime >= #{startdate,jdbcType=DATE} and alerttime < #{enddate,jdbcType=DATE} order by alerttime asc
|