import service from '@/utils/request'

// @Tags SysApplication
// @Summary 创建业务应用系统
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysApplication true "创建业务应用系统"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /app/createSysApplication [post]
export const createSysApplication = (data) => {
  return service({
    url: '/app/createSysApplication',
    method: 'post',
    data
  })
}

// @Tags SysApplication
// @Summary 删除业务应用系统
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysApplication true "删除业务应用系统"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /app/deleteSysApplication [delete]
export const deleteSysApplication = (params) => {
  return service({
    url: '/app/deleteSysApplication',
    method: 'delete',
    params
  })
}

// @Tags SysApplication
// @Summary 批量删除业务应用系统
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除业务应用系统"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /app/deleteSysApplication [delete]
export const deleteSysApplicationByIds = (params) => {
  return service({
    url: '/app/deleteSysApplicationByIds',
    method: 'delete',
    params
  })
}

// @Tags SysApplication
// @Summary 更新业务应用系统
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.SysApplication true "更新业务应用系统"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /app/updateSysApplication [put]
export const updateSysApplication = (data) => {
  return service({
    url: '/app/updateSysApplication',
    method: 'put',
    data
  })
}

// @Tags SysApplication
// @Summary 用id查询业务应用系统
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.SysApplication true "用id查询业务应用系统"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /app/findSysApplication [get]
export const findSysApplication = (params) => {
  return service({
    url: '/app/findSysApplication',
    method: 'get',
    params
  })
}

// @Tags SysApplication
// @Summary 分页获取业务应用系统列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取业务应用系统列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /app/getSysApplicationList [get]
export const getSysApplicationList = (params) => {
  return service({
    url: '/app/getSysApplicationList',
    method: 'get',
    params
  })
}

export const cmsTest = () => {
  return service({
    url: '/cms/test',
    method: 'get'
  })
}
