insert into tenant_accounts(device_no,device_type,sos_enabled,sos_key,
sos_switch_time,creator_id,creator_name,created_time)
values(#{deviceNo},
#{deviceType,typeHandler=org.apache.ibatis.type.EnumOrdinalTypeHandler},#{sosEnabled},
#{sosKey},
current_timestamp,
#{operatorId},
#{operatorName},
current_timestamp)
ON DUPLICATE KEY UPDATE
sos_enabled=#{sosEnabled},
sos_key=#{sosKey},
sos_switch_time=current_timestamp,
last_modifier_name=#{operatorName},
last_modified_time=current_timestamp
insert into tenant_accounts(device_no,device_type,sos_enabled,sos_key,
sos_switch_time,creator_id,creator_name,created_time,read_instruction_time)
values(#{deviceNo},
#{deviceType,typeHandler=org.apache.ibatis.type.EnumOrdinalTypeHandler},0,
'#',
current_timestamp,
#{operatorId},
#{operatorName},
current_timestamp,
current_timestamp)
ON DUPLICATE KEY UPDATE read_instruction_time=current_timestamp,
last_modifier_name=#{operatorName},
last_modified_time=current_timestamp
insert into tenant_accounts(device_no,device_type,logo,title,
creator_id,creator_name,created_time,
alarm_bell)
values(#{deviceNo},
#{deviceType,typeHandler=org.apache.ibatis.type.EnumOrdinalTypeHandler},
#{logo},
#{title},
#{operatorId},
#{operatorName},
current_timestamp,
#{alarmBell})
ON DUPLICATE KEY UPDATE
logo=#{logo},
title=#{title},
last_modifier_name=#{operatorName},
last_modified_time=current_timestamp,
alarm_bell = #{alarmBell}