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


// 获取所有的企业
export function visitorListRq() {
    return request({
        url: '/api/visitor/list',
        method: "get",
    });
}

// 获取企业下的所有用户
export function visitorSelectUserByCustomerRq(id) {
    return request({
        url: '/api/visitor/selectUserByCustomer/' + id,
        method: "get",
    });
}

// 访客预约-添加
export function visitorPersonRq(data) {
    return request({
        url: '/api/visitor/visitorPerson',
        method: "post",
        data,
    });
}


// 访客-预约记录
export function selectVisitorRecordByIntervieweeIdRq(data) {
    return request({
        url: `/api/visitor/selectVisitorRecordByIntervieweeId?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
        method: "post",
        data,
    });
}

// 访客-审核记录
export function selectVisitorRecordByUserIdRq(data) {
    return request({
        url: `/api/visitor/selectVisitorRecordByUserId?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
        method: "post",
        data,
    });
}

// 访客-预约审核
export function updateVisitorPersonStatusRq(data) {
    return request({
        url: '/api/visitor/updateVisitorPersonStatus',
        method: "post",
        data,
    });
}

// 获取访客记录的详情
export function selectVisitorRecordByIdRq(id) {
    return request({
        url: '/api/visitor/selectVisitorRecordById/' + id,
        method: "get",
    });
}