1796 lines
43 KiB
YAML
1796 lines
43 KiB
YAML
basePath: /
|
||
definitions:
|
||
admin.createAdminRequest:
|
||
properties:
|
||
avatar:
|
||
description: 头像
|
||
type: string
|
||
mobile:
|
||
description: 手机号
|
||
type: string
|
||
nickname:
|
||
description: 昵称
|
||
type: string
|
||
password:
|
||
description: 密码
|
||
type: string
|
||
username:
|
||
description: 用户名
|
||
type: string
|
||
required:
|
||
- nickname
|
||
- password
|
||
- username
|
||
type: object
|
||
admin.createAdminResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
admin.deleteAdminRequest:
|
||
properties:
|
||
ids:
|
||
description: 编号(多个用,分割)
|
||
type: string
|
||
required:
|
||
- ids
|
||
type: object
|
||
admin.deleteAdminResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
admin.listData:
|
||
properties:
|
||
avatar:
|
||
description: 头像
|
||
type: string
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
id:
|
||
description: 编号
|
||
type: integer
|
||
mobile:
|
||
description: 手机号
|
||
type: string
|
||
nickname:
|
||
description: 昵称
|
||
type: string
|
||
updated_at:
|
||
description: 更新时间
|
||
type: string
|
||
username:
|
||
description: 用户名
|
||
type: string
|
||
type: object
|
||
admin.listResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/admin.listData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
admin.loginRequest:
|
||
properties:
|
||
password:
|
||
description: 密码 (MD5加密后的密码)
|
||
type: string
|
||
username:
|
||
description: 用户名
|
||
type: string
|
||
required:
|
||
- password
|
||
- username
|
||
type: object
|
||
admin.loginResponse:
|
||
properties:
|
||
is_super:
|
||
description: 是否是超级管理员(1:是 0:否)
|
||
type: integer
|
||
token:
|
||
description: 登录成功后颁发的 Token
|
||
type: string
|
||
type: object
|
||
admin.modifyAdminRequest:
|
||
properties:
|
||
avatar:
|
||
description: 头像
|
||
type: string
|
||
mobile:
|
||
description: 手机号
|
||
type: string
|
||
nickname:
|
||
description: 昵称
|
||
type: string
|
||
password:
|
||
description: 密码
|
||
type: string
|
||
username:
|
||
description: 用户名
|
||
type: string
|
||
required:
|
||
- nickname
|
||
- password
|
||
- username
|
||
type: object
|
||
admin.modifyAdminResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
admin.relAppRequest:
|
||
properties:
|
||
ids:
|
||
description: 小程序编号(多个用,分割)
|
||
type: string
|
||
required:
|
||
- ids
|
||
type: object
|
||
admin.relAppResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
app.adminSendMessageRequest:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
content:
|
||
description: 内容
|
||
type: string
|
||
msg_type:
|
||
description: 消息类型(1:文本 2:图片)
|
||
type: integer
|
||
to_user_id:
|
||
description: 接收用户ID
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- content
|
||
- msg_type
|
||
- to_user_id
|
||
type: object
|
||
app.adminSendMessageResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
app.appMessagePageListResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/app.listMessageData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
app.createAppRequest:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
app_secret:
|
||
description: 小程序密钥
|
||
type: string
|
||
avatar:
|
||
description: 头像
|
||
type: string
|
||
description:
|
||
description: 描述
|
||
type: string
|
||
name:
|
||
description: 名称
|
||
type: string
|
||
template_id:
|
||
description: 模版ID
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- app_secret
|
||
- name
|
||
type: object
|
||
app.createAppResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
app.createAppUserRequest:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
user_avatar:
|
||
description: 用户头像
|
||
type: string
|
||
user_id:
|
||
description: 用户ID
|
||
type: string
|
||
user_mobile:
|
||
description: 用户手机号
|
||
type: string
|
||
user_name:
|
||
description: 用户昵称
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- user_id
|
||
- user_name
|
||
type: object
|
||
app.createAppUserResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
app.deleteAppRequest:
|
||
properties:
|
||
ids:
|
||
description: 小程序编号(多个用,分割)
|
||
type: string
|
||
required:
|
||
- ids
|
||
type: object
|
||
app.deleteAppResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
app.latestMessageByAppIdResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/app.latestMessageData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
app.latestMessageData:
|
||
properties:
|
||
content:
|
||
description: 消息内容
|
||
type: string
|
||
msg_type:
|
||
description: 消息类型(1:文本 2:图片)
|
||
type: integer
|
||
send_time:
|
||
description: 发送时间
|
||
type: string
|
||
sender_avatar:
|
||
description: 发送人头像
|
||
type: string
|
||
sender_id:
|
||
description: 发送人ID
|
||
type: string
|
||
sender_name:
|
||
description: 发送人昵称
|
||
type: string
|
||
unread_count:
|
||
description: 未读消息数量
|
||
type: integer
|
||
type: object
|
||
app.listData:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
app_secret:
|
||
description: 小程序密钥
|
||
type: string
|
||
avatar:
|
||
description: 小程序头像
|
||
type: string
|
||
check_status_text:
|
||
description: 状态文字描述
|
||
type: string
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
description:
|
||
description: 小程序描述
|
||
type: string
|
||
id:
|
||
description: 小程序编号
|
||
type: integer
|
||
message_total:
|
||
description: 消息总数
|
||
type: integer
|
||
name:
|
||
description: 小程序名称
|
||
type: string
|
||
template_id:
|
||
description: 模版ID
|
||
type: string
|
||
updated_at:
|
||
description: 更新时间
|
||
type: string
|
||
type: object
|
||
app.listMessageData:
|
||
properties:
|
||
content:
|
||
description: 消息内容
|
||
type: string
|
||
id:
|
||
description: 消息ID
|
||
type: string
|
||
msg_type:
|
||
description: 消息类型(1:文本 2:图片)
|
||
type: integer
|
||
receiver_id:
|
||
description: 接收人ID
|
||
type: string
|
||
send_time:
|
||
description: 发送时间
|
||
type: string
|
||
sender_id:
|
||
description: 发送人ID
|
||
type: string
|
||
sender_name:
|
||
description: 发送人昵称
|
||
type: string
|
||
type: object
|
||
app.listResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/app.listData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
app.modifyAppRequest:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
app_secret:
|
||
description: 小程序密钥
|
||
type: string
|
||
avatar:
|
||
description: 头像
|
||
type: string
|
||
description:
|
||
description: 描述
|
||
type: string
|
||
name:
|
||
description: 名称
|
||
type: string
|
||
template_id:
|
||
description: 模版ID
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- app_secret
|
||
- name
|
||
type: object
|
||
app.modifyAppResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
app.userListData:
|
||
properties:
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
user_avatar:
|
||
description: 用户头像
|
||
type: string
|
||
user_id:
|
||
description: 用户ID
|
||
type: string
|
||
user_mobile:
|
||
description: 用户手机号
|
||
type: string
|
||
user_name:
|
||
description: 用户昵称
|
||
type: string
|
||
type: object
|
||
app.userListResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/app.userListData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
code.Failure:
|
||
properties:
|
||
code:
|
||
description: 业务码
|
||
type: integer
|
||
message:
|
||
description: 描述信息
|
||
type: string
|
||
type: object
|
||
keyword.createKeywordMaterialRequest:
|
||
properties:
|
||
material_list:
|
||
description: 素材列表
|
||
items:
|
||
$ref: '#/definitions/keyword.keywordMaterial'
|
||
type: array
|
||
required:
|
||
- material_list
|
||
type: object
|
||
keyword.createKeywordMaterialResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
keyword.createKeywordRequest:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
keyword:
|
||
description: 关键字
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- keyword
|
||
type: object
|
||
keyword.createKeywordResponse:
|
||
properties:
|
||
id:
|
||
description: 关键字ID
|
||
type: integer
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
keyword.deleteKeywordResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
keyword.keywordListData:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
created_user:
|
||
description: 创建人
|
||
type: string
|
||
id:
|
||
description: 关键字编号
|
||
type: integer
|
||
keyword:
|
||
description: 意图关键字
|
||
type: string
|
||
material_type_count:
|
||
description: 素材类型数量
|
||
type: string
|
||
updated_at:
|
||
description: 更新时间
|
||
type: string
|
||
updated_user:
|
||
description: 更新人
|
||
type: string
|
||
type: object
|
||
keyword.keywordMaterial:
|
||
properties:
|
||
content:
|
||
description: 素材内容
|
||
type: string
|
||
interval_seconds:
|
||
description: 发送间隔时间(单位:秒)
|
||
type: integer
|
||
type:
|
||
description: 素材类型(1:文本 2:图片)
|
||
type: integer
|
||
required:
|
||
- content
|
||
- interval_seconds
|
||
- type
|
||
type: object
|
||
keyword.keywordMaterialListData:
|
||
properties:
|
||
content:
|
||
description: 素材内容
|
||
type: string
|
||
created_at:
|
||
description: 创建时间
|
||
type: string
|
||
created_user:
|
||
description: 创建人
|
||
type: string
|
||
id:
|
||
description: 主键ID
|
||
type: integer
|
||
interval_seconds:
|
||
description: 素材发送间隔时间(单位:秒)
|
||
type: integer
|
||
keyword_id:
|
||
description: 意图关键字ID
|
||
type: integer
|
||
type:
|
||
description: 素材类型(1:文本 2:图片)
|
||
type: integer
|
||
type: object
|
||
keyword.keywordMaterialPageListResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/keyword.keywordMaterialListData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
keyword.keywordPageListResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/keyword.keywordListData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
keyword.modifyKeywordMaterialRequest:
|
||
properties:
|
||
content:
|
||
description: 素材内容
|
||
type: string
|
||
interval_seconds:
|
||
description: 发送间隔时间(单位:秒)
|
||
type: integer
|
||
type:
|
||
description: 素材类型(1:文本 2:图片)
|
||
type: integer
|
||
required:
|
||
- content
|
||
- interval_seconds
|
||
- type
|
||
type: object
|
||
keyword.modifyKeywordMaterialResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
keyword.modifyKeywordRequest:
|
||
properties:
|
||
keyword:
|
||
description: 意图关键字
|
||
type: string
|
||
required:
|
||
- keyword
|
||
type: object
|
||
keyword.modifyKeywordResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
message.appMessagePageListResponse:
|
||
properties:
|
||
list:
|
||
items:
|
||
$ref: '#/definitions/message.listMessageData'
|
||
type: array
|
||
page:
|
||
description: 当前页码
|
||
type: integer
|
||
page_size:
|
||
description: 每页返回的数据量
|
||
type: integer
|
||
total:
|
||
description: 符合查询条件的总记录数
|
||
type: integer
|
||
type: object
|
||
message.listMessageData:
|
||
properties:
|
||
content:
|
||
description: 消息内容
|
||
type: string
|
||
id:
|
||
description: 消息ID
|
||
type: integer
|
||
msg_type:
|
||
description: 消息类型(1:文本 2:图片)
|
||
type: integer
|
||
receiver_id:
|
||
description: 接收人ID
|
||
type: string
|
||
send_time:
|
||
description: 发送时间
|
||
type: string
|
||
sender_id:
|
||
description: 发送人ID
|
||
type: string
|
||
sender_name:
|
||
description: 发送人昵称
|
||
type: string
|
||
type: object
|
||
message.userSendMessageRequest:
|
||
properties:
|
||
app_id:
|
||
description: 小程序ID
|
||
type: string
|
||
content:
|
||
description: 内容
|
||
type: string
|
||
from_user_id:
|
||
description: 发送用户的ID
|
||
type: string
|
||
from_user_name:
|
||
description: 发送用户的昵称
|
||
type: string
|
||
msg_type:
|
||
description: 消息类型(1:文本 2:图片)
|
||
type: integer
|
||
required:
|
||
- app_id
|
||
- content
|
||
- from_user_id
|
||
- from_user_name
|
||
- msg_type
|
||
type: object
|
||
message.userSendMessageResponse:
|
||
properties:
|
||
message:
|
||
description: 提示信息
|
||
type: string
|
||
type: object
|
||
upload.uploadImageResponse:
|
||
properties:
|
||
preview_image_url:
|
||
description: 可预览图片地址
|
||
type: string
|
||
real_image_url:
|
||
description: 真实图片地址
|
||
type: string
|
||
type: object
|
||
wechat.generateQRCodeRequest:
|
||
properties:
|
||
app_id:
|
||
description: 微信小程序 AppID
|
||
type: string
|
||
app_secret:
|
||
description: 微信小程序 AppSecret
|
||
type: string
|
||
path:
|
||
description: 小程序页面路径
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- app_secret
|
||
- path
|
||
type: object
|
||
wechat.generateQRCodeResponse:
|
||
properties:
|
||
data:
|
||
description: Base64 编码的图片数据
|
||
type: string
|
||
message:
|
||
type: string
|
||
success:
|
||
type: boolean
|
||
type: object
|
||
wechat.miniprogramLoginRequest:
|
||
properties:
|
||
app_id:
|
||
description: 小程序AppID
|
||
type: string
|
||
js_code:
|
||
description: 登录时获取的code
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- js_code
|
||
type: object
|
||
wechat.miniprogramLoginResponse:
|
||
properties:
|
||
message:
|
||
type: string
|
||
openid:
|
||
description: 用户唯一标识
|
||
type: string
|
||
success:
|
||
type: boolean
|
||
token:
|
||
description: 登录token
|
||
type: string
|
||
unionid:
|
||
description: 用户在开放平台的唯一标识符
|
||
type: string
|
||
user_avatar:
|
||
description: 用户头像
|
||
type: string
|
||
user_id:
|
||
description: 用户ID
|
||
type: string
|
||
user_name:
|
||
description: 用户昵称
|
||
type: string
|
||
type: object
|
||
wechat.sendSubscribeMessageRequest:
|
||
properties:
|
||
app_id:
|
||
description: 微信小程序 AppID
|
||
type: string
|
||
app_secret:
|
||
description: 小程序 AppSecret
|
||
type: string
|
||
template_id:
|
||
description: 模板 ID
|
||
type: string
|
||
touser:
|
||
description: 接收者(用户)的 openid
|
||
type: string
|
||
required:
|
||
- app_id
|
||
- app_secret
|
||
- template_id
|
||
- touser
|
||
type: object
|
||
wechat.sendSubscribeMessageResponse:
|
||
properties:
|
||
message:
|
||
type: string
|
||
success:
|
||
type: boolean
|
||
type: object
|
||
wechat.templateRequest:
|
||
properties:
|
||
app_id:
|
||
description: 微信小程序 AppID
|
||
type: string
|
||
required:
|
||
- app_id
|
||
type: object
|
||
wechat.templateResponse:
|
||
properties:
|
||
app_id:
|
||
description: 小程序 AppID
|
||
type: string
|
||
message:
|
||
type: string
|
||
success:
|
||
type: boolean
|
||
template_id:
|
||
description: 模板 ID
|
||
type: string
|
||
type: object
|
||
info:
|
||
contact: {}
|
||
title: mini-chat 接口文档
|
||
version: v0.0.1
|
||
paths:
|
||
/api/admin/{id}:
|
||
put:
|
||
consumes:
|
||
- application/json
|
||
description: 编辑客服
|
||
parameters:
|
||
- description: 编号ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
type: string
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/admin.modifyAdminRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/admin.modifyAdminResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 编辑客服
|
||
tags:
|
||
- 管理端.客服管理
|
||
/api/admin/app/{id}:
|
||
put:
|
||
consumes:
|
||
- application/json
|
||
description: 编辑小程序
|
||
parameters:
|
||
- description: 编号ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
type: string
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/app.modifyAppRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.modifyAppResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 编辑小程序
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/app/create:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 新增小程序
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/app.createAppRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.createAppResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 新增小程序
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/app/delete:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 删除小程序
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/app.deleteAppRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.deleteAppResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 删除小程序
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/app/keyword:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 添加意图关键字
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/keyword.createKeywordRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/keyword.createKeywordResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 添加意图关键字
|
||
tags:
|
||
- 管理端.意图关键字
|
||
/api/admin/app/keyword/{id}:
|
||
delete:
|
||
consumes:
|
||
- application/json
|
||
description: 删除意图关键字
|
||
parameters:
|
||
- description: 编号ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
type: string
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/keyword.deleteKeywordResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 删除意图关键字
|
||
tags:
|
||
- 管理端.意图关键字
|
||
put:
|
||
consumes:
|
||
- application/json
|
||
description: 修改意图关键字
|
||
parameters:
|
||
- description: 编号ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
type: string
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/keyword.modifyKeywordRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/keyword.modifyKeywordResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 修改意图关键字
|
||
tags:
|
||
- 管理端.意图关键字
|
||
/api/admin/app/keyword/material/{id}:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 配置意图关键字素材
|
||
parameters:
|
||
- description: 编号ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
type: string
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/keyword.createKeywordMaterialRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/keyword.createKeywordMaterialResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 配置意图关键字素材
|
||
tags:
|
||
- 管理端.意图关键字
|
||
put:
|
||
consumes:
|
||
- application/json
|
||
description: 修改意图关键字素材
|
||
parameters:
|
||
- description: 素材编号ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
type: string
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/keyword.modifyKeywordMaterialRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/keyword.modifyKeywordMaterialResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 修改意图关键字素材
|
||
tags:
|
||
- 管理端.意图关键字
|
||
/api/admin/app/keyword/materials:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 获取意图关键字素材列表
|
||
parameters:
|
||
- description: 意图关键字ID
|
||
in: query
|
||
name: keyword_id
|
||
required: true
|
||
type: integer
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/keyword.keywordMaterialPageListResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 获取意图关键字素材列表
|
||
tags:
|
||
- 管理端.意图关键字
|
||
/api/admin/app/keywords:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 获取意图关键字列表
|
||
parameters:
|
||
- description: 小程序ID
|
||
in: query
|
||
name: app_id
|
||
required: true
|
||
type: integer
|
||
- description: 意图关键字
|
||
in: query
|
||
name: keyword
|
||
type: string
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/keyword.keywordPageListResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 获取意图关键字列表
|
||
tags:
|
||
- 管理端.意图关键字
|
||
/api/admin/app/users:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 小程序用户列表
|
||
parameters:
|
||
- description: 小程序ID
|
||
in: query
|
||
name: app_id
|
||
required: true
|
||
type: string
|
||
- description: 用户昵称
|
||
in: query
|
||
name: user_name
|
||
type: string
|
||
- description: 用户ID
|
||
in: query
|
||
name: user_id
|
||
type: string
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.userListResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 小程序用户列表
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/apps:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 小程序列表
|
||
parameters:
|
||
- description: 小程序名称
|
||
in: query
|
||
name: name
|
||
type: string
|
||
- description: 小程序ID
|
||
in: query
|
||
name: app_id
|
||
type: string
|
||
- description: 客服编号
|
||
in: query
|
||
name: admin_id
|
||
type: integer
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.listResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 小程序列表
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/create:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 新增客服
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/admin.createAdminRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/admin.createAdminResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 新增客服
|
||
tags:
|
||
- 管理端.客服管理
|
||
/api/admin/delete:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 删除客服
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/admin.deleteAdminRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/admin.deleteAdminResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 删除客服
|
||
tags:
|
||
- 管理端.客服管理
|
||
/api/admin/list:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 客服列表
|
||
parameters:
|
||
- description: 用户名
|
||
in: query
|
||
name: username
|
||
type: string
|
||
- description: 昵称
|
||
in: query
|
||
name: nickname
|
||
type: string
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/admin.listResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 客服列表
|
||
tags:
|
||
- 管理端.客服管理
|
||
/api/admin/login:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 管理员登录
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/admin.loginRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/admin.loginResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 管理员登录
|
||
tags:
|
||
- 管理端.登录
|
||
/api/admin/messages:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 获取消息日志
|
||
parameters:
|
||
- description: 小程序ID
|
||
in: query
|
||
name: app_id
|
||
required: true
|
||
type: string
|
||
- description: 用户ID
|
||
in: query
|
||
name: user_id
|
||
required: true
|
||
type: string
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.appMessagePageListResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 获取消息日志
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/messages/latest:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 管理端根据appid获取最新消息记录,包含已读未读状态,访问时自动标记为已读
|
||
parameters:
|
||
- description: 小程序ID
|
||
in: query
|
||
name: app_id
|
||
required: true
|
||
type: string
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.latestMessageByAppIdResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 根据appid获取最新消息记录
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/rel_app/{id}:
|
||
put:
|
||
consumes:
|
||
- application/json
|
||
description: 客服关联小程序
|
||
parameters:
|
||
- description: 客服编号ID
|
||
in: path
|
||
name: id
|
||
required: true
|
||
type: string
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/admin.relAppRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/admin.relAppResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 客服关联小程序
|
||
tags:
|
||
- 管理端.客服管理
|
||
/api/admin/send_message:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 管理员发送消息
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/app.adminSendMessageRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.adminSendMessageResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
security:
|
||
- LoginVerifyToken: []
|
||
summary: 管理员发送消息
|
||
tags:
|
||
- 管理端.小程序
|
||
/api/admin/upload/image:
|
||
post:
|
||
consumes:
|
||
- multipart/form-data
|
||
description: 上传图片
|
||
parameters:
|
||
- description: 选择文件
|
||
in: formData
|
||
name: file
|
||
required: true
|
||
type: file
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/upload.uploadImageResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 上传图片
|
||
tags:
|
||
- 通用
|
||
/api/app/messages:
|
||
get:
|
||
consumes:
|
||
- application/json
|
||
description: 获取消息日志
|
||
parameters:
|
||
- description: 小程序ID
|
||
in: query
|
||
name: app_id
|
||
required: true
|
||
type: string
|
||
- description: 用户ID
|
||
in: query
|
||
name: user_id
|
||
required: true
|
||
type: string
|
||
- default: 1
|
||
description: 当前页码
|
||
in: query
|
||
name: page
|
||
required: true
|
||
type: integer
|
||
- default: 20
|
||
description: 每页返回的数据量,最多 100 条
|
||
in: query
|
||
name: page_size
|
||
required: true
|
||
type: integer
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/message.appMessagePageListResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 获取消息日志
|
||
tags:
|
||
- 用户端
|
||
/api/app/send_message:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 用户发送消息
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/message.userSendMessageRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/message.userSendMessageResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 用户发送消息
|
||
tags:
|
||
- 用户端
|
||
/api/app/user/create:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 新增小程序用户
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: RequestBody
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/app.createAppUserRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/app.createAppUserResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 新增小程序用户
|
||
tags:
|
||
- 用户端
|
||
/api/wechat/miniprogram/login:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 通过AppID和code获取用户的openid,系统自动生成用户名和头像
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: request
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/wechat.miniprogramLoginRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/wechat.miniprogramLoginResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
"500":
|
||
description: Internal Server Error
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 小程序登录
|
||
tags:
|
||
- 微信
|
||
/api/wechat/qrcode:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 根据 AppID、AppSecret 和页面路径生成微信小程序二维码
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: request
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/wechat.generateQRCodeRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/wechat.generateQRCodeResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
"500":
|
||
description: Internal Server Error
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 生成微信小程序二维码
|
||
tags:
|
||
- 微信
|
||
/api/wechat/subscribe:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 根据模板ID发送订阅消息
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: request
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/wechat.sendSubscribeMessageRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/wechat.sendSubscribeMessageResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
"404":
|
||
description: Not Found
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
"500":
|
||
description: Internal Server Error
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 发送订阅消息
|
||
tags:
|
||
- 微信
|
||
/api/wechat/template:
|
||
post:
|
||
consumes:
|
||
- application/json
|
||
description: 根据 AppID 获取微信小程序的模板ID
|
||
parameters:
|
||
- description: 请求参数
|
||
in: body
|
||
name: request
|
||
required: true
|
||
schema:
|
||
$ref: '#/definitions/wechat.templateRequest'
|
||
produces:
|
||
- application/json
|
||
responses:
|
||
"200":
|
||
description: OK
|
||
schema:
|
||
$ref: '#/definitions/wechat.templateResponse'
|
||
"400":
|
||
description: Bad Request
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
"404":
|
||
description: Not Found
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
"500":
|
||
description: Internal Server Error
|
||
schema:
|
||
$ref: '#/definitions/code.Failure'
|
||
summary: 获取微信小程序模板ID
|
||
tags:
|
||
- 微信
|
||
securityDefinitions:
|
||
LoginVerifyToken:
|
||
in: header
|
||
name: Authorization
|
||
type: apiKey
|
||
swagger: "2.0"
|