import request from "@/utils/request";
const { api } = process.env.CONFIG;


export interface GetProps {
    aCorpIds: string[];
    bCorpIds: string[];
}
/**
 * 主体详细指标
 * @returns 
 */
export function getCorpDuplicateFanOverviewListApi(data: GetProps) {
    return request({
        url: api + `/corpOperation/corpDuplicateFan/overview`,
        method: 'POST',
        data
    })
}


/**
 * 重粉分析
 * @returns 
 */
export function getCorpDuplicateFanRepeatAnalyzeListApi(data: GetProps) {
    return request({
        url: api + `/corpOperation/corpDuplicateFan/repeatAnalyze`,
        method: 'POST',
        data
    })
}



/**
 * 添加客服数量分布
 * @returns 
 */
export function getCorpDuplicateFanRepeatOfCorpUserListApi(data: GetProps) {
    return request({
        url: api + `/corpOperation/corpDuplicateFan/repeatOfCorpUser`,
        method: 'POST',
        data
    })
}

export interface GetFansDetailProps extends GetProps {
    pageNum: number;
    pageSize: number;
}

/**
 * 重复粉丝用户详情
 * @param data 
 * @returns 
 */
export function getCorpDuplicateFanFansDetailListApi(data: GetFansDetailProps) {
    return request({
        url: api + `/corpOperation/corpDuplicateFan/fansDetail`,
        method: 'POST',
        data
    })
}



export interface GetFansDetailListApiProps {
    pageNum: number,
    pageSize: number,
    aCorpIds: string[]
    bCorpIds: string[]
    corpName?: string,
    name?: string,
    minCorpIdCount?: number,
    maxCorpIdCount?: number,
    minCorpUserIdCount?: number,
    maxCorpUserIdCount?: number,
    sortType?: string,
    orderByField?: string
}

/**
 * 重复粉丝用户详情(同时添加查询组、对照组的企微用户详情)
 * @param data 
 * @returns 
 */
export function getFansDetailListApi(data: GetFansDetailListApiProps) {
    return request({
        url: api + `/corpOperation/corpDuplicateFan/fansDetail`,
        method: 'POST',
        data
    })
}


/**
 * 企业id个数 详情
 * @param params 
 * @returns 
 */
export function getDztSelectCorpIdsByQcUuidListApi(data: { qcUuid: string, aCorpIds: string[], bCorpIds: string[] }) {
    return request({
        url: api + `/corpOperation/corpDuplicateFan/selectCorpIdsByQcUuid`,
        method: 'POST',
        data
    })
}


/**
 * 客服号个数 详情
 * @param data 
 * @returns 
 */
export function getDztSelectCorpUserIdsByQcUuidListApi(data: { qcUuid: string, aCorpIds: string[], bCorpIds: string[] }) {
    return request({
        url: api + `/corpOperation/corpDuplicateFan/selectCorpUserIdsByQcUuid`,
        method: 'POST',
        data
    })
}