insert into `t_device_run_state` (`total_count`, `run_count`, `halt_count`, `offline_count`, `creator_date`)
VALUES (#{total_count}, #{run_count}, #{halt_count}, #{offline_count}, SYSDATE())
update t_device_run_state
set total_count = #{total_count},
run_count = #{run_count},
halt_count = #{halt_count},
offline_count = #{offline_count},
creator_date = SYSDATE()
where id = #{id}