import type { Role } from '@/api/user/interface/role'
import type { User } from '@/api/user/interface/user'
import http from '@/api'

/**
 * @name 用户管理模块
 */
// 获取用户列表
export const getUserList = (params: User.ReqUserParams) => {
  return http.post(`/sysUser/list`, params)
}


// 新增用户
export const addUser = (params: User.ResUser) => {
  return http.post(`/sysUser/add`, params)
}

// 编辑用户
export const updateUser = (params: User.ResUser) => {
  return http.post(`/sysUser/update`, params)
}

// 删除用户
export const deleteUser = (params:  string[] ) => {
  return http.post(`/sysUser/delete`, params)
}


// 获取角色列表
export const getRoleList = () => {
  return http.get<Role.RoleBO>(`/sysRole/simpleList`)
}

//修改密码
export const updatePassWord = (params: User.ResPassWordUser) => {
  return http.post(`/sysUser/updatePassword`,params)
}

