import request from "@/utils/request";

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

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

// 编辑  /business/customerMsg/edit
export const editCustomerMsg = (data) => {
  return request({
    url: "/business/customerMsg/edit",
    method: "put",
    data,
  });
};

// 修改阅读状态 /business/customerMsg/updateStatus
export const editCustomerMsgStatus = (query) => {
  return request({
    url: "/business/customerMsg/updateStatus",
    method: "put",
    params: query,
  });
};

// 删除 ​/business​/customerMsg​/{customerIds}
export const delCustomerMsg = (customerIds) => {
  return request({
    url: `/business/customerMsg/${customerIds}`,
    method: "delete",
  });
};
