import request from "@/utils/request";

// 获取列表 /business/officialAccount/list
export const getList = (query) => {
  return request({
    url: "/business/officialAccount/list",
    method: "get",
    params: query,
  });
};

// 获取详情 /business/officialAccount/{hireInfoId}
export const getDetail = (hireInfoId) => {
  return request({
    url: `/business/officialAccount/getInfo/${hireInfoId}`,
    method: "get",
  });
};

// 新增 /business/officialAccount/add
export const addNews = (data) => {
  return request({
    url: "/business/officialAccount/add",
    method: "post",
    data,
  });
};

// 修改 /business/officialAccount/edit
export const editNews = (data) => {
  return request({
    url: "/business/officialAccount/edit",
    method: "put",
    data,
  });
};

// 修改招聘信息状态 /business/officialAccount/updateStatus
export const editNewsStatus = (query) => {
  return request({
    url: "/business/officialAccount/updateStatus",
    method: "put",
    params: query,
  });
};

// 删除 /business/officialAccount/{officialAccountId}
export const delNews = (officialAccountId) => {
  return request({
    url: `/business/officialAccount/${officialAccountId}`,
    method: "delete",
  });
};
