select id, gw_device_id, sub_device_id, slave_id, create_by, create_time, update_by, update_time, remark from iot_sub_gateway
insert into iot_sub_gateway
id,
gw_device_id,
sub_device_id,
slave_id,
create_by,
create_time,
update_by,
update_time,
remark,
#{id},
#{gwDeviceId},
#{subDeviceId},
#{slaveId},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
update iot_sub_gateway
gw_device_id = #{gwDeviceId},
sub_device_id = #{subDeviceId},
slave_id = #{slaveId},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
where id = #{id}
delete from iot_sub_gateway where id = #{id}
delete from iot_sub_gateway where id in
#{id}
delete from iot_sub_gateway where gw_device_id = #{gwDeviceId}
insert into iot_sub_gateway(gw_device_id, sub_device_id, slave_id, create_by, create_time)
values
(#{device.gwDeviceId},
#{device.subDeviceId},
#{device.slaveId},
#{device.createBy},
sysdate()
)