import request from '@/utils/request'

// 查询守护赠送流水列表
export function listGuardLog(query) {
  return request({
    url: '/cai/guardLog/list',
    method: 'get',
    params: query
  })
}

// 查询守护赠送流水详细
export function getGuardLog(id) {
  return request({
    url: '/cai/guardLog/' + id,
    method: 'get'
  })
}

export function getGuardLogByTraceId(traceId) {
  return request({
    url: '/cai/guardLog/trace',
    method: 'get',
    params:{traceId}
  })
}

// 新增守护赠送流水
export function addGuardLog(data) {
  return request({
    url: '/cai/guardLog',
    method: 'post',
    data: data
  })
}

// 修改守护赠送流水
export function updateGuardLog(data) {
  return request({
    url: '/cai/guardLog',
    method: 'put',
    data: data
  })
}

// 删除守护赠送流水
export function delGuardLog(id) {
  return request({
    url: '/cai/guardLog/' + id,
    method: 'delete'
  })
}
