import request from '@/utils/request'

//系统日志列表
export function syslogList(data) {
  return request({
    url: '/system/syslog/list',
    method: 'post',
    data: data
  })
}

//系统日志详情
export function syslogDetail(query) {
  return request({
    url: '/system/syslog/detail',
    method: 'get',
    params: query
  })
}

//算法日志列表
export function algorithmList(data) {
  return request({
    url: '/system/log/algorithm/list',
    method: 'post',
    data: data
  })
}

//算法日志详情
export function algorithmDetail(query) {
  return request({
    url: '/system/log/algorithm/detail',
    method: 'get',
    params: query
  })
}

//在线用户列表
export function onlineList(data) {
  return request({
    url: '/system/online/list',
    method: 'post',
    data: data
  })
}

//踢出登录
export function onlineLogout(query) {
  return request({
    url: '/system/online/logout',
    method: 'get',
    params: query
  })
}

//APK列表
export function appInfoList(data) {
  return request({
    url: '/system/app/info/list',
    method: 'post',
    data: data
  })
}

//新增APK
export function appInfoAdd(data) {
  return request({
    url: '/system/app/info/add',
    method: 'post',
    data: data
  })
}

//编辑APK
export function appInfoUpdate(data) {
  return request({
    url: '/system/app/info/update',
    method: 'post',
    data: data
  })
}

//删除APK
export function appInfoDelete(data) {
  return request({
    url: '/system/app/info/delete',
    method: 'post',
    data: data
  })
}

//apk升级列表
export function appUpgradeList(data) {
  return request({
    url: '/system/app/upgrade/list',
    method: 'post',
    data: data
  })
}

//获取应用分类
export function appInfoType(query) {
  return request({
    url: '/system/app/info/type',
    method: 'get',
    params: query
  })
}

//apk升级详情
export function appUpgradeDetail(query) {
  return request({
    url: '/system/app/upgrade/detail',
    method: 'get',
    params: query
  })
}

//通过类型获取APK版本号
export function getVersionByType(query) {
  return request({
    url: '/system/app/info/getVersionByType',
    method: 'get',
    params: query
  })
}

/**************************定时任务**************************/

// 查询调度日志列表
export function listJobLog(query) {
  return request({
    url: '/base/job/log/list',
    method: 'get',
    params: query
  })
}

// 删除调度日志
export function delJobLog(jobLogId) {
  return request({
    url: '/base/job/log/' + jobLogId,
    method: 'delete'
  })
}

// 清空调度日志
export function cleanJobLog() {
  return request({
    url: '/base/job/log/clean',
    method: 'delete'
  })
}
/***********************商户管理***********************/


// 获取商户列表
export function tenantList(data) {
  return request({
    url: '/system/tenant/list',
    method: 'post',
    data: data
  })
}

// 新增商户
export function tenantAdd(data) {
  return request({
    url: '/system/tenant/add',
    method: 'post',
    data: data
  })
}

// 编辑商户
export function tenantUpdate(data) {
  return request({
    url: '/system/tenant/update',
    method: 'post',
    data: data
  })
}

// 删除商户
export function tenantDelete(data) {
  return request({
    url: '/system/tenant/delete',
    method: 'post',
    data: data
  })
}

// 商户详情
export function tenantDetail(query) {
  return request({
    url: '/system/tenant/detail',
    method: 'get',
    params: query
  })
}
/***********************认证管理***********************/
//认证信息列表
export function authCustomerList(data) {
  return request({
    url: '/auth/customer/list',
    method: 'post',
    data: data
  })
}


//认证信息新增
export function authCustomerAdd(data) {
  return request({
    url: '/auth/customer/add',
    method: 'post',
    data: data
  })
}

//认证信息编辑
export function authCustomerUpdate(data) {
  return request({
    url: '/auth/customer/update',
    method: 'post',
    data: data
  })
}

//认证信息删除
export function authCustomerDelete(data) {
  return request({
    url: '/auth/customer/delete',
    method: 'post',
    data: data
  })
}

//认证信息详情
export function authCustomerDetail(query) {
  return request({
    url: '/auth/customer/detail',
    method: 'get',
    params: query
  })
}

//认证授权列表
export function authLicenseList(data) {
  return request({
    url: '/auth/license/list',
    method: 'post',
    data: data
  })
}


//认证授权删除
export function authLicenseDelete(data) {
  return request({
    url: '/auth/license/delete',
    method: 'post',
    data: data
  })
}

//认证授权新增/编辑
export function authLicenseSetup(data) {
  return request({
    url: '/auth/license/setup',
    method: 'post',
    data: data
  })
}

//认证授权重置密钥
export function authLicenseSecret(data) {
  return request({
    url: '/auth/license/secret',
    method: 'post',
    data: data
  })
}

//认证授权详情
export function authLicenseDetail(query) {
  return request({
    url: '/auth/license/detail',
    method: 'get',
    params: query
  })
}
/***********************外部链接***********************/
//外部链接-列表
export function systemLinkList(query) {
  return request({
    url: '/system/link/list',
    method: 'get',
    params: query
  })
}
//外部链接-新增
export function systemLinkAdd(data) {
  return request({
    url: '/system/link/add',
    method: 'post',
    data: data
  })
}
//外部链接-编辑
export function systemLinkUpdate(data) {
  return request({
    url: '/system/link/update',
    method: 'post',
    data: data
  })
}
//外部链接-删除
export function systemLinkDelete(data) {
  return request({
    url: '/system/link/delete',
    method: 'post',
    data: data
  })
}
