import request from '@/utils/request'

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

export function myListCourseRedPacketLog(query) {
  return request({
    url: '/course/courseRedPacketLog/myList',
    method: 'get',
    params: query
  })
}
export function myListCourseRedPacketLogNew(query) {
  return request({
    url: '/course/courseRedPacketLog/myListNew',
    method: 'get',
    params: query
  })
}

// 查询短链课程看课记录详细
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 videoList(id) {
  return request({
    url: '/course/courseRedPacketLog/videoList/' + 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(query) {
  return request({
    url: '/course/courseRedPacketLog/export',
    method: 'get',
    params: query
  })
}
