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


// 展厅列表
export function showroomListRq() {
    return request({
        url: '/api/showroom/list',
        method: "post",
    });
}

// 展厅详情
export function showroomDetailRq(id) {
    return request({
        url: '/api/showroom/get/' + id,
        method: "get",
    });
}


// 查询展厅能否预约
export function selectFreeShowRoomRq(data) {
    return request({
        url: '/api/showroom/selectFreeShowRoom',
        method: "post",
        data
    });
}

// 查询展厅已经预约的记录
export function appointmentRecordRq(data) {
    return request({
        url: '/api/showroom/appointmentRecord',
        method: "post",
        data
    });
}

// 查询字典
export function listByTypeRq(data) {
    return request({
        url: '/api/showroom/listByType',
        method: "post",
        data
    });
}


// 新增展厅预约记录
export function saveShowRoomRecordRq(data) {
    return request({
        url: '/api/showroom/saveShowRoomRecord',
        method: "post",
        data
    });
}

// 查询预约记录
export function selectShowroomRecordRq(data) {
    return request({
        url: `/api/showroom/selectShowroomRecord?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
        method: "post",
        data
    });
}

// 查询展厅预约详情
export function selectShowroomRecordByIdRq(id) {
    return request({
        url: '/api/showroom/selectShowroomRecordById/' + id,
        method: "get",
    });
}