select id, point_name, match_table, match_field, site_id, device_category, create_by, create_time, update_by, update_time, remark from ems_point_match
insert into ems_point_match
point_name,match_table,match_field,site_id,device_category,create_by,create_time,update_by,update_time,remark,#{pointName},#{matchTable},#{matchField},#{siteId},#{deviceCategory},#{createBy},#{createTime},#{updateBy},#{updateTime},#{remark},
update ems_point_match
point_name = #{pointName},match_table = #{matchTable},match_field = #{matchField},site_id = #{siteId},device_category = #{deviceCategory},create_by = #{createBy},create_time = #{createTime},update_by = #{updateBy},update_time = #{updateTime},remark = #{remark},
where id = #{id}
delete from ems_point_match where id = #{id}
delete from ems_point_match where id in
#{id}
AND (
( site_id = #{siteId}
AND device_id IN
#{deviceId}
)
)
AND site_id IN
#{siteId}