import { http } from '@/utils/http/axios';

/**
 * @description: 列表
 */
export function getMessageTemplateList(params?) {
  return http.request({
    url: '/message/template/page',
    method: 'GET',
    params,
  });
}

/**
 * @description: 根据ID获取详情
 */
export function getMessageTemplateDetail(id) {
  return http.request({
    url: '/message/template/detail/' + id,
    method: 'get',
  });
}

/**
 * @description: 添加
 */
export function messageTemplateAdd(data: any) {
  return http.request({
    url: '/message/template/add',
    method: 'POST',
    data,
  });
}

/**
 * @description: 更新
 */
export function messageTemplateUpdate(data: any) {
  return http.request({
    url: '/message/template/update',
    method: 'PUT',
    data,
  });
}

/**
 * @description: 删除
 */
export function messageTemplateDelete(id) {
  return http.request({
    url: '/message/template/delete/' + id,
    method: 'DELETE',
  });
}

/**
 * @description: 批量删除
 */
export function messageTemplateBatchDelete(data: any) {
  return http.request({
    url: '/message/template/batchDelete',
    method: 'DELETE',
    data,
  });
}
