import request from '@/utils/request'

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

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

// 新增房屋抵押信息
export function addMortgage(data) {
    return request({
        url: '/crmHouseMortgage',
        method: 'post',
        data: data
    })
}

// 修改房屋抵押信息
export function updateMortgage(data) {
    return request({
        url: '/crmHouseMortgage',
        method: 'put',
        data: data
    })
}

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