import request from '@/utils/request'

// 查询入驻申请列表
export function listMerchantEntryApply(query) {
  return request({
    url: '/agri/merchantEntryApply/list',
    method: 'get',
    params: query
  })
}

// 查询待审核数量
export function getPendingCount() {
  return request({
    url: '/agri/merchantEntryApply/pendingCount',
    method: 'get'
  })
}

// 查询入驻申请详情
export function getMerchantEntryApply(applyId) {
  return request({
    url: '/agri/merchantEntryApply/' + applyId,
    method: 'get'
  })
}

// 审核通过
export function approveMerchantEntryApply(applyId, data) {
  return request({
    url: '/agri/merchantEntryApply/approve/' + applyId,
    method: 'put',
    data: data
  })
}

// 审核驳回
export function rejectMerchantEntryApply(data) {
  return request({
    url: '/agri/merchantEntryApply/reject',
    method: 'put',
    data: data
  })
}
