select machine_id,
area_id,
device_name,
brand,
device_id,
enabled,
online_status,
fingerprint,
del_flag,
remark,
create_by,
create_time,
update_by,
update_time
from t_visitor_machine
select m.machine_id,
m.area_id,
a.area_name,
m.device_name,
m.brand,
m.device_id,
m.fingerprint,
m.enabled,
m.online_status,
m.remark,
m.create_time
from t_visitor_machine m
left join t_visit_area a on a.area_id = m.area_id and a.del_flag = '0'
insert into t_visitor_machine (
area_id,
device_name,
brand,
device_id,
enabled,
online_status,
remark,
create_by,
create_time
) values (
#{areaId},
#{deviceName},
#{brand},
#{deviceId},
#{enabled},
#{onlineStatus},
#{remark},
#{createBy},
sysdate()
)
update t_visitor_machine
area_id = #{areaId},
device_name = #{deviceName},
brand = #{brand},
device_id = #{deviceId},
online_status = #{onlineStatus},
enabled = #{enabled},
online_status = #{onlineStatus},
fingerprint = #{fingerprint},
remark = #{remark},
update_by = #{updateBy},
update_time = sysdate()
where machine_id = #{machineId}
and del_flag = '0'
update t_visitor_machine
set enabled = #{enabled},
update_by = #{updateBy},
update_time = sysdate()
where del_flag = '0'
and machine_id in
#{machineId}
update t_visitor_machine
set online_status = #{onlineStatus},
update_by = #{updateBy},
update_time = sysdate()
where del_flag = '0'
and machine_id in
#{machineId}
update t_visitor_machine
set del_flag = '1',
update_by = #{updateBy},
update_time = sysdate()
where del_flag = '0'
and machine_id in
#{machineId}