import { request } from '@umijs/max';

export function findAllSysRole(params?: any, options?: { [key: string]: any }) {
  return request(`/admin/sys/role/findAllSysRole`, {
    method: 'GET',
    params,
    ...(options || {})
  });
}

// 新增角色

export function roleAdd(params?: any, options?: { [key: string]: any }) {
  return request(`/admin/sys/role/add`, {
    method: 'POST',
    params,
    ...(options || {})
  });
}

// 删除角色
export function roleDelete(params?: any, options?: { [key: string]: any }) {
  return request(`/admin/sys/role/deleteRoleBatchByIds`, {
    method: 'POST',
    params,
    ...(options || {})
  });
}

// 修改角色

export function roleUpdate(params?: any, options?: { [key: string]: any }) {
  return request(`/admin/sys/role/update`, {
    method: 'POST',
    data: params,
    ...(options || {})
  });
}


// 获取角色信息
export function roleInfo(params?: any, options?: { [key: string]: any }) {
  return request(`/admin/sys/role/get`, {
    method: 'GET',
    params,
    ...(options || {})
  });
}

