import { post, get } from '@/api/request';

const env = import.meta.env;
const PREFIX = env.VITE_API_PREFIX_SYSTEM;

// 新增用户
export const userAddUserApi = (params: any) => {
  return post(`${PREFIX}user/addUser`, params);
};

// 用户列表
export const userListUserApi = (params: any) => {
  return post(`${PREFIX}user/listUser`, params);
};

// 更新用户
export const userUpdateUserApi = (params: any) => {
  return post(`${PREFIX}user/updateUser`, params);
};

// 用户详情
export const userQueryUserDetailApi = (params: any) => {
  return post(`${PREFIX}user/queryUserDetail`, params);
};

// 删除用户
export const userDelUserApi = (params: any) => {
  return post(`${PREFIX}user/delUser`, params);
};

// 新增用户组
export const userAddGroupApi = (params: any) => {
  return post(`${PREFIX}user/addGroup`, params);
};

// 用户组列表
export const userQueryGroupApi = (params: any) => {
  return post(`${PREFIX}user/queryGroup`, params);
};

// 用户组详情
export const userQueryGroupDetailApi = (params: any) => {
  return post(`${PREFIX}user/queryGroupDetail`, params);
};

// 更新用户组
export const userUpdateGroupApi = (params: any) => {
  return post(`${PREFIX}user/updateGroup`, params);
};

// 删除用户组
export const userDelGrouppi = (params: any) => {
  return post(`${PREFIX}user/delGroup`, params);
};
