import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { CustomerTargetVO, CustomerTargetQuery } from './types';

/** 查询客户目标列表 */
export function listCustomerTarget(query: CustomerTargetQuery): AxiosPromise<CustomerTargetVO[]> {
    return request({
        url: '/customer/customerTarget/list',
        method: 'get',
        params: query
    });
}

/** 获取客户目标详细信息 */
export function getCustomerTarget(id: string | number): AxiosPromise<CustomerTargetVO> {
    return request({
        url: `/customer/customerTarget/${id}`,
        method: 'get'
    });
}

/** 删除客户目标 */
export function delCustomerTarget(id: string | number | (string | number)[]): AxiosPromise<void> {
    return request({
        url: `/customer/customerTarget/${id}`,
        method: 'delete'
    });
}
