a.ID,
a.alarm_name,
a.be_scene_id,
a.be_device_id,
a.be_attribute_id,
a.be_address,
a.be_type,
a.compute_rules,
a.to_scene_id,
a.to_device_id,
a.to_attribute_id,
a.to_address,
a.to_type,
a.alar_rules,
a.alar_value
insert sms_data_alarm_manage (alarm_name,company_org_id,dept_org_id,tenant_id,be_scene_id,be_device_id,be_attribute_id,be_type,compute_rules,
to_scene_id,to_device_id,to_attribute_id,to_type,alar_rules,alar_value,date_create,status)
values
(#{alarmName}, #{companyOrgId}, #{deptOrgId}, #{tenantId}, #{beSceneId},#{beDeviceId},
#{beAttributeId}, #{beType}, #{computeRules}, #{toSceneId},
#{toDeviceId}, #{toAttributeId}, #{toType}, #{alarRules},
#{alarValue}, #{dateCreate},#{status})
update sms_data_alarm_manage
set
alarm_name = #{alarmName},
be_scene_id =#{beSceneId},
be_device_id = #{beDeviceId},
be_attribute_id = #{beAttributeId},
be_address = #{beAddress},
be_type = #{beType},
compute_rules = #{beAddress},
to_scene_id = #{toSceneId},
to_device_id= #{toDeviceId},
to_attribute_id = #{toAttributeId},
to_address = #{toAddress},
to_type = #{toType},
alar_rules = #{alarRules},
alar_value = #{alarValue},
date_update = #{dateUpdate}
where
id =#{alarmId}
update sms_data_alarm_manage
set
status = 0
where
id in
#{alarmId}