import request from '@/config/axios'

// 统计分析 API
export const statisticAnalysisApi = {
  // 获取发布职位浏览量总数
  getAnalysisJobBrowseNum: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/browse/num`, params })
  },

  // 获取发布职位浏览量统计分析明细
  getAnalysisJobBrowseNumPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/browse/num/page`, params })
  },

  // 职位刷新量统计分析
  getAnalysisJobRefreshPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/refresh/page`, params })
  },

  // 获取发布职位统计分析明细
  getAnalysisJobNumPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/num/page`, params })
  },

  // 获取新投递简历统计分析明细
  getAnalysisJobCvNewPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/cv/new/page`, params })
  },

  // 获取已查看简历统计分析明细
  getAnalysisJobCvLookPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/cv/look/page`, params })
  },

  // 获取待面试统计分析明细
  getAnalysisInterviewWaitPage: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/interview/wait/page`, params })
  },

  // 获取完成面试统计分析明细
  getAnalysisInterviewCompletePage: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/interview/complete/page`, params })
  },

  
  // 获取投递简历的性别分布
  getAnalysisJobCvSexCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/cv/sex/count`, params })
  },

  // 获取投递简历的年龄分布
  getAnalysisJobCvAgeCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/cv/age/count`, params })
  },

  // 获取投递简历的工作经验分布
  getAnalysisJobCvExpCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/cv/exp/count`, params })
  },

  // 获取投递简历的学历分布
  getAnalysisJobCvEduCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/cv/edu/count`, params })
  },

  // 下拉框
  // 获取企业精简信息列表
  getAnalysisEnterpriseSimpleList: async (params: any) => {
    return await request.get({ url: `/menduner/system/enterprise/simple-list`, params })
  },

  // 根据条件查询企业用户列表
  getAnalysisEnterpriseUserList: async (params: any) => {
    return await request.get({ url: `/menduner/system/enterprise-user-bind/list`, params })
  },
  // 获得招聘职位列表
  getAnalysisJobAdvertisedList: async (params: any) => {
    return await request.get({ url: `/menduner/system/job-advertised/list`, params })
  },

  // 招聘进展明细导出
  analysisExport: async (params) => {
    return await request.download({ url: `/menduner/system/analysis/export`, params })
  },

  // 前N最多人发布的职位类型
  getJobPositionTop: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/position/top`, params })
  },

  // 统计发布职位数量
  getJobCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/count`, params })
  },

  // 最新发布的前N个职位
  getJobDetails: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/job/top`, params })
  },

  // 获取注册但未填写简历的用户
  getUserUnResumeCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/user/un-resume`, params })
  },

  // 获取用户登录记录
  getLoginUserCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/login-user/page`, params })
  },

  // 获取企业用户登录记录
  getLoginEnterpriseUserCount: async (params: any) => {
    return await request.get({ url: `/menduner/system/analysis/get/login-enterprise-user/page`, params })
  }
}