import request from '@/assets/js/utils/request'

// 查询短信配置信息
export function querySmsConfigPage(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/sms/querySmsConfigPage',
    method: 'post',
    data
  })
}
// 删除短信配置
export function deleteSmsConfig(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/sms/deleteSmsConfig?id=' + data,
    method: 'post'
  })
}
// 根据主键id查询配置信息
export function querySmsConfigById(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/sms/querySmsConfigById?id=' + data,
    method: 'post'
  })
}
// 添加短信配置
export function addSmsConfig(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/sms/addSmsConfig',
    method: 'post',
    data
  })
}
// 启用/停用该配置
export function updateSmsConfigUserStatusById(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/sms/updateSmsConfigUserStatusById?id=' + data.id + '&userStatus=' + data.userStatus,
    method: 'post'
  })
}
// 获取短信日志列表信息
export function getSmsList(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/sms/getSmsList',
    method: 'post',
    data
  })
}
// 获取日期
export function getHoliday(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/calendar/getHoliday?year=' + data,
    method: 'post'
  })
}
// 同步国家节假日
export function syncHoliday(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/calendar/syncHoliday?year=' + data,
    method: 'post'
  })
}
// 修改节假日
export function updateHoliday(data) {
  return request({
    url: '/bidprocurement/common-tools/tools/calendar/updateHoliday',
    method: 'post',
    data
  })
}
