select c.id,
c.name,
c.ip,
c.port,
c.rtsp_port,
c.username,
c.password,
c.type,
c.factory,
c.chan_num,
c.start_chan,
c.longitude,
c.latitude,
c.altitude,
c.dock_id,
c.user_id,
c.dept_id,
c.login_id,
c.state,
c.create_by,
c.create_time,
c.update_by,
c.update_time
from ard_camera c
left join sys_dept d on d.dept_id = c.dept_id
left join sys_user u on u.user_id = c.user_id
insert into ard_camera
id,
name,
ip,
port,
rtsp_port,
username,
password,
type,
factory,
chan_num,
start_chan,
longitude,
latitude,
altitude,
dock_id,
login_id,
dept_id,
user_id,
create_by,
create_time,
update_by,
update_time,
state,
#{id},
#{name},
#{ip},
#{port},
#{rtspPort},
#{username},
#{password},
#{type},
#{factory},
#{chanNum},
#{startChan},
#{longitude},
#{latitude},
#{altitude},
#{dockId},
#{loginId},
#{deptId},
#{userId},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{state},
update ard_camera
name = #{name},
ip = #{ip},
port = #{port},
rtsp_port= #{rtspPort},
username = #{username},
password = #{password},
type = #{type},
factory = #{factory},
chan_num = #{chanNum},
start_chan = #{startChan},
longitude = #{longitude},
latitude = #{latitude},
altitude = #{altitude},
dock_id = #{dockId},
login_id = #{loginId},
dept_id = #{deptId},
user_id = #{userId},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
state = #{state},
where id = #{id}
delete
from ard_camera
where id = #{id}
delete from ard_camera where id in
#{id}
update ard_camera set login_id = -1 where id = #{id}