✨ init Project
This commit is contained in:
110
src/api/bot/bot.js
Normal file
110
src/api/bot/bot.js
Normal file
@@ -0,0 +1,110 @@
|
||||
import service from '@/utils/request'
|
||||
// @Tags Bot
|
||||
// @Summary 创建机器人
|
||||
// @Security ApiKeyAuth
|
||||
// @Accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body model.Bot true "创建机器人"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
|
||||
// @Router /bt/createBot [post]
|
||||
export const createBot = (data) => {
|
||||
return service({
|
||||
url: '/bt/createBot',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// @Tags Bot
|
||||
// @Summary 删除机器人
|
||||
// @Security ApiKeyAuth
|
||||
// @Accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body model.Bot true "删除机器人"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
||||
// @Router /bt/deleteBot [delete]
|
||||
export const deleteBot = (params) => {
|
||||
return service({
|
||||
url: '/bt/deleteBot',
|
||||
method: 'delete',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// @Tags Bot
|
||||
// @Summary 批量删除机器人
|
||||
// @Security ApiKeyAuth
|
||||
// @Accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body request.IdsReq true "批量删除机器人"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
||||
// @Router /bt/deleteBot [delete]
|
||||
export const deleteBotByIds = (params) => {
|
||||
return service({
|
||||
url: '/bt/deleteBotByIds',
|
||||
method: 'delete',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// @Tags Bot
|
||||
// @Summary 更新机器人
|
||||
// @Security ApiKeyAuth
|
||||
// @Accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body model.Bot true "更新机器人"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
||||
// @Router /bt/updateBot [put]
|
||||
export const updateBot = (data) => {
|
||||
return service({
|
||||
url: '/bt/updateBot',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// @Tags Bot
|
||||
// @Summary 用id查询机器人
|
||||
// @Security ApiKeyAuth
|
||||
// @Accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data query model.Bot true "用id查询机器人"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
|
||||
// @Router /bt/findBot [get]
|
||||
export const findBot = (params) => {
|
||||
return service({
|
||||
url: '/bt/findBot',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// @Tags Bot
|
||||
// @Summary 分页获取机器人列表
|
||||
// @Security ApiKeyAuth
|
||||
// @Accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data query request.PageInfo true "分页获取机器人列表"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
||||
// @Router /bt/getBotList [get]
|
||||
export const getBotList = (params) => {
|
||||
return service({
|
||||
url: '/bt/getBotList',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// @Tags Bot
|
||||
// @Summary 不需要鉴权的机器人接口
|
||||
// @Accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data query botReq.BotSearch true "分页获取机器人列表"
|
||||
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
|
||||
// @Router /bt/getBotPublic [get]
|
||||
export const getBotPublic = () => {
|
||||
return service({
|
||||
url: '/bt/getBotPublic',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user