import request from '@/utils/request'

// 查询同步日志列表
export function listLog(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopLog',
      _mt: 'list',
      ...query
    }
  })
}

// 查询同步日志详细
export function getLog(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopLog',
      _mt: 'get',
      id: id
    }
  })
}

// 新增同步日志
export function addLog(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopLog',
      _mt: 'add',
      shopLog: data
    }
  })
}

// 修改同步日志
export function updateLog(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopLog',
      _mt: 'update',
      shopLog: data
    }
  })
}

// 删除同步日志
export function delLog(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopLog',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出同步日志
export function exportLog(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopLog',
      _mt: 'export',
      ...query
    }
  })
}
