import request from '@/utils/request'

// 查询短链课程看课记录列表
export function listCourseRedPacketLog(query) {
  return request({
    url: '/course/courseRedPacketLog/list',
    method: 'POST',
    data: query
  })
}

// 查询短链课程看课记录列表
export function listCourseRedPacketLogPage(data) {
  return request({
    url: '/course/courseRedPacketLog/pageList',
    method: 'post',
    data: data
  })
}

export function getRedPacketLogCount(data) {
  return request({
    url: '/course/courseRedPacketLog/getRedPacketLogCount',
    method: 'post',
    data: data
  })
}

// 查询短链课程看课记录详细
export function getCourseRedPacketLog(logId) {
  return request({
    url: '/course/courseRedPacketLog/' + logId,
    method: 'get'
  })
}
export function courseList() {
  return request({
    url: '/course/courseRedPacketLog/courseList',
    method: 'get',
  })
}
export function courseListByCompanyId(companyId) {
  return request({
    url: '/course/courseRedPacketLog/courseListByCompanyId/' + companyId,
    method: 'get',
  })
}
export function videoList(id) {
  return request({
    url: '/course/courseRedPacketLog/videoList/' + id,
    method: 'get'
  })
}

export function videoListByWatch(id) {
  return request({
    url: '/course/courseRedPacketLog/videoListByWatch/' + id,
    method: 'get'
  })
}
// 新增短链课程看课记录
export function addCourseRedPacketLog(data) {
  return request({
    url: '/course/courseRedPacketLog',
    method: 'post',
    data: data
  })
}

// 修改短链课程看课记录
export function updateCourseRedPacketLog(data) {
  return request({
    url: '/course/courseRedPacketLog',
    method: 'put',
    data: data
  })
}

// 删除短链课程看课记录
export function delCourseRedPacketLog(logId) {
  return request({
    url: '/course/courseRedPacketLog/' + logId,
    method: 'delete'
  })
}

// 导出短链课程看课记录
export function exportCourseRedPacketLog(data) {
  return request({
    url: '/course/courseRedPacketLog/export',
    method: 'post',
    data: data
  })
}

// 导出短链课程看课记录
export function exportCourseRedPacketLogCountExport(data) {
  return request({
    url: '/course/courseRedPacketLog/countExport',
    method: 'post',
    data: data
  })
}
