import request from "@/utils/request";

export interface GetCorpPhoneMsgAlarmListProps {
    pageNum: number,
    pageSize: number,
    sysUserId?: number,
    corpUserId?: string,
    corpId?: number,
    beginTime?: string,
    endTime?: string
}
/**
 * 获取跳转链接列表
 * @returns 
 */
export async function getCorpPhoneMsgAlarmListApi(data: GetCorpPhoneMsgAlarmListProps) {
    return request({
        url: `/corpPhoneMsgAlarm/list`,
        method: 'POST',
        data
    })
}


/**
 * 告警详情
 * @param data 
 * @returns 
 */
export async function getCorpPhoneMsgAlarmDetailsListApi(data: { pageNum: number, pageSize: number, alarmId: number }) {
    return request({
        url: `/corpPhoneMsgAlarm/getInfo`,
        method: 'POST',
        data
    })
}


/**
 * 处理告警
 * @param id 
 * @returns 
 */
export async function updateCorpPhoneMsgAlarmApi(ids: number[]) {
    return request({
        url: `/corpPhoneMsgAlarm/handle`,
        method: 'POST',
        data: ids
    })
}