import request from '@/utils/request'

// 查询资源关联列表
export function listLink(query) {
  return request({
    url: '/hezhi/link/list',
    method: 'get',
    params: query
  })
}

// 查询资源关联详细
export function getLink(linkId) {
  return request({
    url: '/hezhi/link/' + linkId,
    method: 'get'
  })
}

// 新增资源关联
export function addLink(data) {
  return request({
    url: '/hezhi/link',
    method: 'post',
    data: data
  })
}

// 修改资源关联
export function updateLink(data) {
  return request({
    url: '/hezhi/link',
    method: 'put',
    data: data
  })
}

// 删除资源关联
export function delLink(linkId) {
  return request({
    url: '/hezhi/link/' + linkId,
    method: 'delete'
  })
}

// 查询评价机构与课程关联列表
export function listLinkEvaluateAgencyCourse(query) {
  return request({
    url: '/hezhi/link/listLinkEvaluateAgencyCourse',
    method: 'get',
    params: query
  })
}

// 查询直播与老师关联列表
export function listLinkLiveBroadcastTeacher(query) {
  return request({
    url: '/hezhi/link/listLinkLiveBroadcastTeacher',
    method: 'get',
    params: query
  })
}

// 所有课程列表
export function getAllCourseList(query) {
  return request({
    url: '/hezhi/course/getAllCourseList',
    method: 'get',
    params: query
  })
}

// 所有课程列表(排除已被选择课程)
export function getAllCourseListByQuery(query) {
  return request({
    url: '/hezhi/course/getAllCourseListByQuery',
    method: 'get',
    params: query
  })
}
