/*
 *    Copyright (c) 2018-2025, linshenxs All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: linshenxs
 */

import request from '@/router/axios'

export function fetchList(data) {
  return request({
    url: '/admin/userMgt/searchUser',
    method: 'post',
    data
  })
}

export function quickSearch(params) {
  return request({
    url: '/admin/userMgt/quickSearchUser',
    method: 'get',
    params
  })
}

export function bankFlowList(data) {
  return request({
    url: '/admin/userMgt/searchUserFlow',
    method: 'post',
    data
  })
}

export function valueFlowList(data) {
  return request({
    url: '/admin/userMgt/searchUserValueFlow',
    method: 'post',
    data
  })
}

export function growthFlowList(data) {
  return request({
    url: '/admin/userMgt/searchUserGrowFlow',
    method: 'post',
    data
  })
}

export function userDetails(id) {
  return request({
    url: '/admin/userMgt/' + id,
    method: 'get'
  })
}

export function changeShowId(params) {
  return request({
    url: '/admin/userMgt/changeShowId',
    method: 'get',
    params
  })
}

export function changeValue(params) {
  return request({
    url: '/admin/userMgt/changeValue',
    method: 'get',
    params
  })
}

export function changeGrowth(params) {
  return request({
    url: '/admin/userMgt/changeGrowth',
    method: 'get',
    params
  })
}

export function changePromote(params) {
  return request({
    url: '/admin/userMgt/changePromote',
    method: 'get',
    params
  })
}

export function changeInvitor(params) {
  return request({
    url: '/admin/userMgt/changeInvitor',
    method: 'get',
    params
  })
}

export function changeA(params) {
  return request({
    url: '/admin/userMgt/changeA',
    method: 'get',
    params
  })
}

export function changeB(params) {
  return request({
    url: '/admin/userMgt/changeB',
    method: 'get',
    params
  })
}

export function changePermission(params) {
  return request({
    url: '/admin/userMgt/changePermission',
    method: 'get',
    params
  })
}

export function changeStatus(params) {
  return request({
    url: '/admin/userMgt/changeBlock',
    method: 'get',
    params
  })
}

export function getUserInfo(params) {
  return request({
    url: '/admin/userMgt/getUserDetails',
    method: 'get',
    params
  })
}

export function getValueInfo(params) {
  return request({
    url: '/admin/userMgt/checkVipLevel',
    method: 'get',
    params
  })
}

export function getTaskInfo(params) {
  return request({
    url: '/admin/userMgt/checkTaskLevel',
    method: 'get',
    params
  })
}

export function getUserPermissions(params) {
  return request({
    url: '/admin/userMgt/readUserPermissions',
    method: 'get',
    params
  })
}
