import request from '@/utils/request'
import { preventRepeatFu } from "@/utils/hciot";

// 查询邮件模板列表
export function listEmailtpl(query) {
    return request({
        url: '/system/emailtpl/list',
        method: 'get',
        params: query
    })
}

// 查询邮件模板详细
export function getEmailtpl(id) {
    return request({
        url: '/system/emailtpl/' + id,
        method: 'get'
    })
}

// 新增邮件模板
export function addEmailtpl(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/emailtpl',
        method: 'post',
        data: data
    })
}

// 修改邮件模板
export function updateEmailtpl(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/emailtpl',
        method: 'put',
        data: data
    })
}

// 删除邮件模板
export function delEmailtpl(id) {
    return request({
        url: '/system/emailtpl/' + id,
        method: 'delete'
    })
}
