import { ResPage, Post } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 岗位管理模块
 */
// 获取用户列表
export const getPostList = (params: Post.ReqPostParams) => {
  return http.get<ResPage<Post.ResPostList>>(PORT1 + `/system/post/list`, params);
};

// 新增用户
export const addPost = (params: Partial<Post.ResPostList>) => {
  return http.post(PORT1 + `/system/post`, params);
};

// 编辑用户
export const editPost = (params: Partial<Post.ResPostList>) => {
  return http.put(PORT1 + `/system/post`, params);
};

// 删除用户
export const deletePost = (ids: string[]) => {
  return http.delete(PORT1 + `/system/post/${ids.join(",")}`);
};
