import request from '@/utils/request'

export function fetchUserList(query) {
    return request({
        url: '/ncjtEntranceGuard/getUserPageList',
        method: 'get',
        params: query
    })
}

export function fetchGroupList(query) {
    return request({
        url: '/ncjtEntranceGuard/getGroupPageList',
        method: 'get',
        params: query
    })
}

export function checkGroups(query) {
    return request({
        url: '/ncjtEntranceGuard/getUserGroupById',
        method: 'post',
        params: query
    })
}

export function bindGroups(data) {
    return request({
        url: '/ncjtEntranceGuard/bindUserWithGroupIds',
        method: 'post',
        data
    })
}

export function deleteGroups(data) {
    return request({
        url: '/ncjtEntranceGuard/unbindUserWithGroupIds',
        method: 'post',
        data
    })
}

export function searchList(query) {
    return request({
        url: '/ncjtEntranceGuard/getUserPageListByParams',
        method: 'post',
        params: query
    })
}
