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

// 查询短信模板列表
export function listSmstpl(query) {
    return request({
        url: '/system/smstpl/list',
        method: 'get',
        params: query
    })
}

// 查询短信模板详细
export function getSmstpl(id) {
    return request({
        url: '/system/smstpl/' + id,
        method: 'get'
    })
}

// 新增短信模板
export function addSmstpl(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/smstpl',
        method: 'post',
        data: data
    })
}

// 修改短信模板
export function updateSmstpl(data) {
    preventRepeatFu(true)
    return request({
        url: '/system/smstpl',
        method: 'put',
        data: data
    })
}

// 删除短信模板
export function delSmstpl(id) {
    return request({
        url: '/system/smstpl/' + id,
        method: 'delete'
    })
}
