import request from '@/utils/request'

// 查询拼单主列表
export function listGroupOrder(query) {
    return request({
        url: '/service/groupOrder/list',
        method: 'get',
        params: query
    })
}

// 查询拼单主详细
export function getGroupOrder(id) {
    return request({
        url: '/service/groupOrder/' + id,
        method: 'get'
    })
}

// 退款
export function refundGroupOrder(id) {
    return request({
        url: '/service/groupOrder/refund/' + id,
        method: 'post'
    })
}

// 新增拼单主
export function addGroupOrder(data) {
    return request({
        url: '/service/groupOrder',
        method: 'post',
        data: data
    })
}

// 修改拼单主
export function updateGroupOrder(data) {
    return request({
        url: '/service/groupOrder',
        method: 'put',
        data: data
    })
}

// 删除拼单主
export function delGroupOrder(id) {
    return request({
        url: '/service/groupOrder/' + id,
        method: 'delete'
    })
}
