import request from '@/utils/request'

// 查询商品评价列表
export function listComment(query) {
  return request({
    url: '/system/comment/list',
    method: 'get',
    params: query
  })
}

// 根据订单类型查询商品评价列表
export function listGoodsCommentByOrderType(query) {
    return request({
      url: '/system/comment/listGoodsCommentByOrderType',
      method: 'get',
      params: query
    })
  }

// 查询商品评价详细
export function getComment(commontId) {
  return request({
    url: '/system/comment/' + commontId,
    method: 'get'
  })
}

// 新增商品评价
export function addComment(data) {
  return request({
    url: '/system/comment',
    method: 'post',
    data: data
  })
}

// 修改商品评价
export function updateComment(data) {
  return request({
    url: '/system/comment',
    method: 'put',
    data: data
  })
}

// 删除商品评价
export function delComment(commontId) {
  return request({
    url: '/system/comment/' + commontId,
    method: 'delete'
  })
}

// 导出商品评价
export function exportComment(query) {
  return request({
    url: '/system/comment/export',
    method: 'get',
    params: query
  })
}
