select id, live_id,user_id, msg_status, online, create_time, create_by, update_by, update_time, remark,online_seconds,global_visible,single_visible,live_flag,replay_flag,location from live_watch_user insert into live_watch_user live_id, user_id, msg_status, online, create_time, create_by, update_by, update_time, remark, online_seconds, global_visible, single_visible, live_flag, replay_flag, location, #{liveId}, #{userId}, #{msgStatus}, #{online}, #{createTime}, #{createBy}, #{updateBy}, #{updateTime}, #{remark}, #{onlineSeconds}, #{globalVisible}, #{singleVisible}, #{liveFlag}, #{replayFlag}, #{location}, update live_watch_user live_id = #{liveId}, user_id = #{userId}, msg_status = #{msgStatus}, online = #{online}, create_time = #{createTime}, create_by = #{createBy}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, online_seconds = #{onlineSeconds}, global_visible = #{globalVisible}, single_visible = #{singleVisible}, live_flag = #{liveFlag}, replay_flag = #{replayFlag}, location = #{location}, where id = #{id} delete from live_watch_user where id = #{id} delete from live_watch_user where id in #{id} INSERT INTO live_watch_user ( live_id, user_id, live_flag, replay_flag, msg_status, online, location, create_time, update_time ) VALUES ( #{liveId}, #{userId}, #{liveFlag}, #{replayFlag}, #{msgStatus}, #{online}, #{location}, #{createTime}, #{updateTime} ) ON DUPLICATE KEY UPDATE msg_status = VALUES(msg_status), online = VALUES(online), location = VALUES(location), update_time = VALUES(update_time)