import {
    request
} from '../selfRequest';

// 查询条件筛选
// 1.会议室类型，2.人数，3.会议室设备，4.形式
export function meetingRoomDict(param) {
    return request({
        url: '/api/roomContent/searchInfo/' + param,
        method: "get",
    });
}

// 会议室列表
export function meetingRoomListRq(data) {
    return request({
        url: '/api/roomContent/list',
        method: "post",
        data
    });
}

// 会议室详情信息
export function meetingRoomDetailRq(id) {
    return request({
        url: '/api/roomContent/info/' + id,
        method: "get",
    });
}

// 当前会议室已预约的记录
export function meetingRoomBookedRecordRq(id) {
    return request({
        url: '/api/roomContent/getMeetingRoomRecord/' + id,
        method: "get",
    });
}

// 当前会议室是否可以预约
export function selectFreeMeetingRoomRq(data) {
    return request({
        url: '/api/roomContent/selectFreeMeetingRoom',
        method: "post",
        data
    });
}

// 获取优惠卷
// "userId":10000,
// "customerId":33,
// "type":1 类型 1.会议室，2.展厅
export function getCustomerTicketRq(data) {
    return request({
        url: '/api/roomContent/getCustomerTicket',
        method: "post",
        data
    });
}

// 计算会议室金额
export function calculateMeetingRoomAmountRq(data) {
    return request({
        url: '/api/roomContent/calculateMeetingRoomAmount',
        method: "post",
        data
    });
}

// 提交会议预约
export function saveMeetingRecordRq(data) {
    return request({
        url: '/api/roomContent/saveMeetingRecord',
        method: "post",
        data
    });
}

// 根据用户id查询预约记录
export function selectReservationListByUserIdRq(data) {
    return request({
        url: '/api/roomContent/selectReservationListByUserId?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
        method: "post",
        data
    });
}

// 根据用户id查询参与记录
export function selectVisitorInvitationRecordRq(data) {
    return request({
        url: '/api/visitor/selectVisitorInvitationRecord/' + data.userId + '?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
        method: "get",
    });
}

// 根据id查询预约信息
export function selectReservationByIdRq(id) {
    return request({
        url: '/api/roomContent/selectReservationById/' + id,
        method: "get",
    });
}

// 获取公司地址信息经纬度
export function selectCoordinateRq() {
    return request({
        url: '/api/roomContent/selectCoordinate',
        method: "get",
    });
}


// 根据会议室id查询所有的会议室服务与设备
export function getMeetingRoomServiceAndEquipmentRq(id) {
    return request({
        url: '/api/roomContent/getMeetingRoomServiceAndEquipment/' + id,
        method: "get",
    });
}

// 判断是否参与过会议
export function roomContentIsVisitorRq(data) {
    return request({
        url: '/api/roomContent/isVisitor',
        method: "post",
        data
    });
}

// 参与会议
export function roomContentAddVisitorRq(data) {
    return request({
        url: '/api/roomContent/addVisitor',
        method: "post",
        data
    });
}

// 会议室-取消预约
export function cancelOrderRq(data) {
    return request({
        url: '/api/roomContent/cancelOrder',
        method: "post",
        data
    });
}

// 会议室-支付订单
export function meetingRoomPayOrderRq(data) {
    return request({
        url: '/api/roomContent/payOrder',
        method: "post",
        data
    });
}