import request from '@/utils/request'

// 查询土地抵押信息列表
export function listMortgage(query) {
    return request({
        url: '/crmLandMortgage/findByPage',
        method: 'get',
        params: query
    })
}

// 查询土地抵押信息详细
export function getMortgage(id) {
    return request({
        url: '/crmLandMortgage/' + id,
        method: 'get'
    })
}

// 新增土地抵押信息
export function addMortgage(data) {
    return request({
        url: '/crmLandMortgage',
        method: 'post',
        data: data
    })
}

// 修改土地抵押信息
export function updateMortgage(data) {
    return request({
        url: '/crmLandMortgage',
        method: 'put',
        data: data
    })
}

// 删除土地抵押信息
export function delMortgage(id) {
    return request({
        url: '/crmLandMortgage/deleteAll',
        method: 'delete'
    })
}
// 批量删除行政许可
export function delMortgageBatch(ids) {
    console.log(ids);
    return request.post('/crmLandMortgage/delete',ids)
}