Files
sundynix-radio-be/docs/swagger.yaml
T
2026-02-27 13:54:01 +08:00

2700 lines
60 KiB
YAML

definitions:
request.CarePlan:
properties:
icon:
description: icon信息
type: string
name:
description: 农事名称
type: string
period:
description: 周期
type: integer
type: object
request.ChangePwd:
properties:
id:
type: string
newPwd:
type: string
type: object
request.CompleteTask:
properties:
remark:
type: string
taskId:
type: string
required:
- taskId
type: object
request.CreateBadge:
properties:
comparator:
type: string
description:
type: string
dimension:
description: '维度: EXPERTISE(专家), PERSISTENCE(勤勉), JOURNAL(记录)'
type: string
groupId:
description: '组ID: 用于前端聚合显示 (e.g. "fertilizerMaster")'
type: string
iconId:
type: string
name:
type: string
rewardSunlight:
type: integer
sort:
type: integer
targetAction:
description: '触发动作: ACT_FERTILIZE, ACT_WATER...'
type: string
threshold:
type: integer
tier:
description: '等级: 1=铜, 2=银, 3=金'
type: integer
type: object
request.CreateCarePlan:
properties:
icon:
description: icon信息
type: string
name:
description: 农事名称
type: string
period:
description: 周期
type: integer
plantId:
type: string
required:
- plantId
type: object
request.CreateComment:
properties:
content:
description: 评论内容
type: string
postId:
description: 帖子id
type: string
required:
- content
- postId
type: object
request.CreateGrowthRecord:
properties:
content:
type: string
desc:
type: string
name:
type: string
ossIds:
items:
type: string
type: array
plantId:
type: string
tag:
type: string
required:
- plantId
type: object
request.CreateLevelConf:
properties:
level:
description: 等级数值
type: integer
minSunlight:
description: 达到该等级所需的最小阳光值
type: integer
perks:
description: 解锁权益描述 (e.g., "解锁智能诊断")
type: string
title:
description: 等级称号 (e.g., "萌芽园丁")
type: string
type: object
request.CreateMyPlant:
properties:
carePlans:
description: 养护计划
items:
$ref: '#/definitions/request.CarePlan'
type: array
name:
description: 植物名称
type: string
ossIds:
description: 图片ids
items:
type: string
type: array
placement:
description: 摆放位置
type: string
plantTime:
description: 种植时间
type: string
plantingMaterial:
description: 植料(即土的材质)
type: string
potMaterial:
description: 花盆材质
type: string
potSize:
description: 花盆大小 如直径 20cm × 高度 18cm
type: string
sunlight:
description: 光照条件如每日12小时
type: string
type: object
request.CreatePost:
properties:
content:
description: 内容
type: string
location:
description: 位置
type: string
ossIds:
description: 图片id[]
items:
type: string
type: array
title:
description: 标题 必须
type: string
type: object
request.CreateTopic:
properties:
endTime:
type: string
remark:
type: string
startTime:
type: string
title:
type: string
type: object
request.CreateWiki:
properties:
aliases:
description: 别名
type: string
classIds:
description: 分类id
items:
type: string
type: array
difficulty:
description: 种植难度 1-5级
type: integer
distributionArea:
description: 分布区域
type: string
flowerDiameter:
description: 花直径(cm)
type: integer
floweringColor:
description: 花色
type: string
floweringPeriod:
description: 开花期
type: string
floweringShape:
description: 花形
type: string
foliageColor:
description: 叶色
type: string
foliageShape:
description: 叶形
type: string
foliageType:
description: 叶型
type: string
fruit:
description:
type: string
genus:
description:
type: string
growthHabit:
description: 生长习性
type: string
height:
description: 高度(cm)
type: integer
isHot:
description: 是否热门
type: integer
latinName:
description: 拉丁名
type: string
lifeCycle:
description: 生命周期
type: string
lightIntensity:
description: 光照强度
type: string
lightType:
description: 光照类型(直射,散射等)
type: string
name:
description: 名称
type: string
optimalTempPeriod:
description: 最佳温度区间
type: string
ossIds:
description: 图片
items:
type: string
type: array
pestsDiseases:
description: 常见病虫害
type: string
relatedWikiIds:
description: 相关推荐
items:
type: string
type: array
reproductionMethod:
description: 繁殖方法
type: string
stem:
description:
type: string
required:
- name
type: object
request.CreateWikiClass:
properties:
name:
description: 分类名称
type: string
ossId:
description: 图片id
type: string
required:
- name
type: object
request.GetClientList:
properties:
clientId:
type: string
current:
description: 页码
type: integer
keyword:
description: 关键字
type: string
name:
type: string
pageSize:
description: 每页大小
type: integer
type: object
request.GetMenuTree:
properties:
category:
type: integer
parentId:
type: string
type: object
request.GetOssFileList:
properties:
current:
description: 页码
type: integer
keyword:
description: 关键字
type: string
name:
type: string
pageSize:
description: 每页大小
type: integer
type: object
request.GetRoleList:
properties:
code:
type: string
current:
description: 页码
type: integer
keyword:
description: 关键字
type: string
name:
type: string
pageSize:
description: 每页大小
type: integer
type: object
request.GetUserList:
properties:
account:
type: string
current:
description: 页码
type: integer
keyword:
description: 关键字
type: string
pageSize:
description: 每页大小
type: integer
phone:
type: string
type: object
request.GrantMenu:
properties:
menuIds:
items:
type: string
type: array
roleId:
type: string
type: object
request.GrantRole:
properties:
roleIds:
items:
type: string
type: array
userId:
type: string
type: object
request.IdsReq:
properties:
ids:
items:
type: string
type: array
type: object
request.Login:
properties:
account:
type: string
captcha:
type: string
captchaId:
type: string
password:
type: string
type: object
request.PageInfo:
properties:
current:
description: 页码
type: integer
keyword:
description: 关键字
type: string
pageSize:
description: 每页大小
type: integer
type: object
request.PostPage:
properties:
current:
description: 页码
type: integer
hasReviewed:
description: 是否审核通过
type: integer
keyword:
description: 关键字
type: string
pageSize:
description: 每页大小
type: integer
title:
description: 标题
type: string
type: object
request.UpdateBadge:
properties:
comparator:
type: string
description:
type: string
dimension:
description: '维度: EXPERTISE(专家), PERSISTENCE(勤勉), JOURNAL(记录)'
type: string
groupId:
description: '组Id: 用于前端聚合显示 (e.g. "fertilizerMaster")'
type: string
iconId:
type: string
id:
type: string
name:
type: string
rewardSunlight:
type: integer
sort:
type: integer
targetAction:
description: '触发动作: ACT_FERTILIZE, ACT_WATER...'
type: string
threshold:
type: integer
tier:
description: '等级: 1=铜, 2=银, 3=金'
type: integer
required:
- id
type: object
request.UpdateLevelConf:
properties:
id:
type: string
level:
description: 等级数值
type: integer
minSunlight:
description: 达到该等级所需的最小阳光值
type: integer
perks:
description: 解锁权益描述 (e.g., "解锁智能诊断")
type: string
title:
description: 等级称号 (e.g., "萌芽园丁")
type: string
required:
- id
type: object
request.UpdateMyPlant:
properties:
carePlans:
items:
$ref: '#/definitions/request.UpdatePlan'
type: array
id:
type: string
name:
description: 植物名称
type: string
placement:
description: 摆放位置
type: string
plantingMaterial:
description: 植料(即土的材质)
type: string
potMaterial:
description: 花盆材质
type: string
potSize:
description: 花盆大小 如直径 20cm × 高度 18cm
type: string
sunlight:
description: 光照条件如每日12小时
type: string
required:
- id
type: object
request.UpdatePlan:
properties:
icon:
description: icon信息
type: string
id:
type: string
name:
description: 农事名称
type: string
period:
description: 周期
type: integer
required:
- id
type: object
request.UpdateProfile:
properties:
avatarId:
type: string
nickname:
type: string
type: object
request.UpdateTopic:
properties:
endTime:
type: string
id:
type: integer
remark:
type: string
startTime:
type: string
title:
type: string
required:
- id
type: object
request.UpdateWiki:
properties:
aliases:
description: 别名
type: string
difficulty:
description: 种植难度 1-5级
type: integer
distributionArea:
description: 分布区域
type: string
flowerDiameter:
description: 花直径(cm)
type: integer
floweringColor:
description: 花色
type: string
floweringPeriod:
description: 开花期
type: string
floweringShape:
description: 花形
type: string
foliageColor:
description: 叶色
type: string
foliageShape:
description: 叶形
type: string
foliageType:
description: 叶型
type: string
fruit:
description:
type: string
genus:
description:
type: string
growthHabit:
description: 生长习性
type: string
height:
description: 高度(cm)
type: integer
id:
type: string
latinName:
description: 拉丁名
type: string
lifeCycle:
description: 生命周期
type: string
lightIntensity:
description: 光照强度
type: string
lightType:
description: 光照类型(直射,散射等)
type: string
name:
description: 名称
type: string
optimalTempPeriod:
description: 最佳温度区间
type: string
pestsDiseases:
description: 常见病虫害
type: string
stem:
description:
type: string
required:
- id
type: object
request.UpdateWikiClass:
properties:
id:
type: string
name:
description: 分类名称
type: string
ossId:
description: 图片id
type: string
required:
- id
type: object
request.WikiPage:
properties:
classId:
description: 分类id
items:
type: string
type: array
current:
description: 页码
type: integer
isHot:
description: 是否热门 0否 1是
type: integer
keyword:
description: 关键字
type: string
name:
description: 植物名称
type: string
pageSize:
description: 每页大小
type: integer
type: object
response.CaptchaRes:
properties:
captcha:
type: string
captchaId:
type: string
type: object
response.LoginResponse:
properties:
expiresAt:
type: integer
token:
type: string
user:
$ref: '#/definitions/system.User'
type: object
response.PageResult:
properties:
list: {}
page:
type: integer
pageSize:
type: integer
total:
type: integer
type: object
response.Response:
properties:
code:
type: integer
data: {}
msg:
type: string
type: object
system.Client:
properties:
activeTimeout:
type: integer
additionalInfo:
type: string
clientId:
type: string
createdAt:
type: string
createdAtStr:
type: string
grantType:
type: string
id:
description: 主键ID
type: string
name:
type: string
updatedAt:
type: string
type: object
system.Menu:
properties:
category:
type: integer
children:
items:
$ref: '#/definitions/system.Menu'
type: array
code:
type: string
createdAt:
type: string
createdAtStr:
type: string
icon:
type: string
id:
description: 主键ID
type: string
locale:
type: string
name:
type: string
parentId:
type: string
path:
type: string
permission:
type: string
sort:
type: integer
title:
type: string
updatedAt:
type: string
type: object
system.Oss:
properties:
createdAt:
type: string
createdAtStr:
type: string
id:
description: 主键ID
type: string
key:
type: string
md5:
type: string
name:
type: string
suffix:
type: string
tag:
type: string
updatedAt:
type: string
url:
type: string
type: object
system.Role:
properties:
code:
type: string
createdAt:
type: string
createdAtStr:
type: string
id:
description: 主键ID
type: string
menus:
items:
$ref: '#/definitions/system.Menu'
type: array
name:
type: string
sort:
type: integer
updatedAt:
type: string
type: object
system.User:
properties:
account:
type: string
avatar:
$ref: '#/definitions/system.Oss'
avatarId:
type: string
clientId:
type: string
createdAt:
type: string
createdAtStr:
type: string
id:
description: 主键ID
type: string
miniOpenId:
type: string
name:
type: string
nickName:
type: string
phone:
type: string
saOpenId:
type: string
sessionKey:
type: string
tenantId:
type: string
unionId:
type: string
updatedAt:
type: string
type: object
info:
contact: {}
description: 使用gin + gorm进行极速开发的全栈开发基础平台
title: Swagger API接口文档
version: v1.0.0
paths:
/auth/captcha:
get:
produces:
- application/json
responses:
"200":
description: 获取验证码
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/response.CaptchaRes'
type: object
summary: 获取验证码
tags:
- 登录相关
/auth/getLocation:
get:
parameters:
- description: longitude
in: query
name: longitude
required: true
type: string
- description: latitude
in: query
name: latitude
required: true
type: string
produces:
- application/json
responses: {}
summary: 获取位置信息
tags:
- 登录相关
/auth/getPhone:
get:
parameters:
- description: code
in: query
name: code
required: true
type: string
- description: openId
in: query
name: openId
required: true
type: string
produces:
- application/json
responses: {}
summary: 获取手机号
tags:
- 登录相关
/auth/getWeather:
get:
parameters:
- description: adcode
in: query
name: adcode
required: true
type: string
produces:
- application/json
responses: {}
summary: 获取天气信息
tags:
- 登录相关
/auth/login:
post:
consumes:
- application/json
parameters:
- description: 用户名, 密码, 验证码,验证码id
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.Login'
produces:
- application/json
responses:
"200":
description: 登录成功
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
summary: pc登录
tags:
- 登录相关
/auth/logout:
get:
produces:
- application/json
responses:
"200":
description: 登出成功
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: pc登出
tags:
- 登录相关
/auth/miniLogin:
get:
parameters:
- description: code
in: query
name: code
required: true
type: string
produces:
- application/json
responses:
"200":
description: 小程序登录
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/response.LoginResponse'
type: object
summary: 小程序登录
tags:
- 登录相关
/classify/myClassifyLog:
post:
consumes:
- application/json
parameters:
- description: 分页
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.PageInfo'
produces:
- application/json
responses:
"200":
description: 识别记录
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 我的植物识别记录
tags:
- 识别相关
/classify/plant:
post:
consumes:
- multipart/form-data
parameters:
- description: 植物识别
in: formData
name: file
required: true
type: file
produces:
- application/json
responses:
"200":
description: 文件OCR
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: base64植物识别
tags:
- 识别相关
/client/delete:
post:
consumes:
- application/json
parameters:
- description: ids
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: 删除client
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 删除client
tags:
- 客户端管理
/client/detail:
get:
description: id获取详情
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 获取client详情
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/system.Client'
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 获取client详情
tags:
- 客户端管理
/client/getClientList:
post:
consumes:
- application/json
parameters:
- description: client
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GetClientList'
produces:
- application/json
responses:
"200":
description: 获取client列表
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/response.PageResult'
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 获取client列表
tags:
- 客户端管理
/client/save:
post:
consumes:
- application/json
parameters:
- description: client
in: body
name: data
required: true
schema:
$ref: '#/definitions/system.Client'
produces:
- application/json
responses:
"200":
description: 创建client
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 创建client
tags:
- 客户端管理
/client/update:
post:
consumes:
- application/json
parameters:
- description: client
in: body
name: data
required: true
schema:
$ref: '#/definitions/system.Client'
produces:
- application/json
responses:
"200":
description: 更新client
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 更新client
tags:
- 客户端管理
/config/badge/add:
post:
consumes:
- application/json
parameters:
- description: 添加徽章配置
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateBadge'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"添加成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 添加徽章配置
tags:
- 徽章配置
/config/badge/delete:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"删除成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 删除徽章配置
tags:
- 徽章配置
/config/badge/find:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 根据ID获取徽章配置
tags:
- 徽章配置
/config/badge/tree:
get:
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 获取徽章配置树形结构
tags:
- 徽章配置
/config/badge/update:
post:
consumes:
- application/json
parameters:
- description: 更新参数
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateBadge'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"更新成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 更新徽章配置
tags:
- 徽章配置
/config/level/add:
post:
consumes:
- application/json
parameters:
- description: 添加等级配置
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateLevelConf'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"添加成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 添加等级配置
tags:
- 等级配置
/config/level/detail:
get:
parameters:
- description: 等级配置id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"查询成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 等级配置详情
tags:
- 等级配置
/config/level/list:
get:
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"查询成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 等级配置列表
tags:
- 等级配置
/config/level/update:
post:
consumes:
- application/json
parameters:
- description: 修改等级配置
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateLevelConf'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"修改成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 修改等级配置
tags:
- 等级配置
/menu/delete:
get:
description: 删除menu
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 详情
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 删除menu
tags:
- 菜单管理
/menu/detail:
get:
description: id获取详情
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 详情
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/system.Menu'
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 获取menu详情
tags:
- 菜单管理
/menu/getAllMenuTree:
post:
consumes:
- application/json
parameters:
- description: 菜单信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GetMenuTree'
produces:
- application/json
responses:
"200":
description: 获取所有菜单树
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
items:
$ref: '#/definitions/system.Menu'
type: array
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 获取所有菜单树
tags:
- 菜单管理
/menu/getUserMenuTree:
get:
produces:
- application/json
responses:
"200":
description: 用户菜单数据
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
items:
$ref: '#/definitions/system.Menu'
type: array
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 用户菜单数据
tags:
- 菜单管理
/menu/route:
get:
produces:
- application/json
responses:
"200":
description: 用户route
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
items:
$ref: '#/definitions/system.Menu'
type: array
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 用户路由
tags:
- 菜单管理
/menu/save:
post:
consumes:
- application/json
parameters:
- description: menu
in: body
name: data
schema:
$ref: '#/definitions/system.Menu'
produces:
- application/json
responses:
"200":
description: 新建菜单/按钮
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 新增菜单
tags:
- 菜单管理
/menu/update:
post:
consumes:
- application/json
parameters:
- description: menu
in: body
name: data
schema:
$ref: '#/definitions/system.Menu'
produces:
- application/json
responses:
"200":
description: 更新菜单
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 更新菜单
tags:
- 菜单管理
/oss/delete:
post:
consumes:
- application/json
parameters:
- description: 批量删除文件
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: 删除文件
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 删除文件
tags:
- 文件相关
/oss/detail:
get:
parameters:
- description: 文件id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 文件详情
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 文件详情
tags:
- 文件相关
/oss/getFileList:
post:
consumes:
- application/json
parameters:
- description: 文件列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GetOssFileList'
produces:
- application/json
responses:
"200":
description: 文件列表
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 文件列表
tags:
- 文件相关
/oss/upload:
post:
consumes:
- multipart/form-data
parameters:
- description: 上传文件
in: formData
name: file
required: true
type: file
produces:
- application/json
responses:
"200":
description: 上传文件
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 文件上传
tags:
- 文件相关
/plant/add:
post:
consumes:
- application/json
parameters:
- description: 创建植物
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateMyPlant'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"添加成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 添加植物
tags:
- 我的植物
/plant/completeTask:
post:
consumes:
- application/json
parameters:
- description: 完成任务
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CompleteTask'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"完成任务"}'
schema:
type: string
security:
- BearerAuth: []
summary: 完成任务
tags:
- 我的植物
/plant/deletePlan:
post:
consumes:
- application/json
parameters:
- description: 删除植物
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"删除成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 删除任务
tags:
- 我的植物
/plant/deletePlant:
post:
consumes:
- application/json
parameters:
- description: 删除植物
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"删除成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 删除植物
tags:
- 我的植物
/plant/detail:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取ById成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: ById植物详情
tags:
- 我的植物
/plant/growth/add:
post:
consumes:
- application/json
parameters:
- description: 添加成长记录
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateGrowthRecord'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"添加成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 添加成长记录
tags:
- 我的植物
/plant/page:
post:
consumes:
- application/json
parameters:
- description: 分页获取植物列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.PageInfo'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 植物列表
tags:
- 我的植物
/plant/plan/add:
post:
consumes:
- application/json
parameters:
- description: 添加养护事项
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateCarePlan'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"添加成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 添加养护事项
tags:
- 我的植物
/plant/plan/delete:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"删除成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 删除养护事项
tags:
- 我的植物
/plant/todayTask:
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 今日任务
tags:
- 我的植物
/plant/update:
post:
consumes:
- application/json
parameters:
- description: 修改ById植物
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateMyPlant'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"修改ById成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 修改ById植物
tags:
- 我的植物
/post/comment:
post:
consumes:
- application/json
parameters:
- description: 评论帖子
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateComment'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"评论成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 评论帖子
tags:
- 帖子
/post/like:
get:
parameters:
- description: 帖子id
in: query
name: id
required: true
type: string
- description: 点赞类型 1 点赞 2 取消点赞
in: query
name: type
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"点赞成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 点赞帖子
tags:
- 帖子
/post/myPost:
post:
consumes:
- application/json
parameters:
- description: 分页获取帖子列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.PostPage'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 我的发布
tags:
- 帖子
/post/page:
post:
consumes:
- application/json
parameters:
- description: 分页获取帖子列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.PostPage'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 帖子列表
tags:
- 帖子
/post/publish:
post:
consumes:
- application/json
parameters:
- description: 发布帖子
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreatePost'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"发布成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 发布帖子
tags:
- 帖子
/profile/detail:
get:
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"查询成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 用户详情
tags:
- 个人中心
/profile/update:
post:
consumes:
- application/json
parameters:
- description: 修改用户信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateProfile'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"修改成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 修改用户信息
tags:
- 个人中心
/role/delete:
post:
consumes:
- application/json
description: 删除角色
parameters:
- description: 批量删除角色
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: 删除角色
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
summary: 删除角色
tags:
- 角色管理
/role/detail:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 角色详情
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/system.Role'
type: object
security:
- ApiKeyAuth: []
summary: 角色详情
tags:
- 角色管理
/role/getRoleList:
post:
consumes:
- application/json
description: 获取角色列表
parameters:
- description: 页码, 每页大小, 搜索条件
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GetRoleList'
produces:
- application/json
responses:
"200":
description: 获取角色列表,返回包括列表,总数,页码,每页大小
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/response.PageResult'
msg:
type: string
type: object
summary: 获取角色列表
tags:
- 角色管理
/role/grantMenu:
post:
consumes:
- application/json
parameters:
- description: 授权菜单给角色
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GrantMenu'
produces:
- application/json
responses:
"200":
description: 授权菜单给角色
schema:
$ref: '#/definitions/response.Response'
security:
- ApiKeyAuth: []
summary: 授权菜单给角色
tags:
- 角色管理
/role/save:
post:
consumes:
- application/json
parameters:
- description: 角色信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/system.Role'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
security:
- ApiKeyAuth: []
summary: 创建角色
tags:
- 角色管理
/role/update:
post:
consumes:
- application/json
parameters:
- description: 角色ID
in: body
name: data
required: true
schema:
$ref: '#/definitions/system.Role'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
security:
- ApiKeyAuth: []
summary: 修改角色
tags:
- 角色管理
/topic/add:
post:
consumes:
- application/json
parameters:
- description: 修改话题
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateTopic'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"发布成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 修改话题
tags:
- 帖子话题
/topic/delete:
post:
consumes:
- application/json
parameters:
- description: 删除话题
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"删除成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 删除任务
tags:
- 帖子话题
/topic/detail:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 话题详情
tags:
- 帖子话题
/topic/list:
get:
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 话题列表
tags:
- 帖子话题
/topic/page:
post:
consumes:
- application/json
parameters:
- description: 分页获取话题列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.PageInfo'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 话题分页
tags:
- 帖子话题
/user/changePassword:
post:
consumes:
- application/json
description: 修改密码
parameters:
- description: 用户id
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.ChangePwd'
produces:
- application/json
responses:
"200":
description: 修改密码成功
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/system.User'
type: object
security:
- ApiKeyAuth: []
summary: 修改密码
tags:
- 用户管理
/user/delete:
post:
consumes:
- application/json
parameters:
- description: 批量删除用户
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: 删除用户
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 删除用户
tags:
- 用户管理
/user/detail:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 获取用户详情成功
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/system.User'
type: object
security:
- ApiKeyAuth: []
summary: 获取用户详情
tags:
- 用户管理
/user/getUserList:
post:
consumes:
- application/json
parameters:
- description: 页码, 每页大小, 搜索条件
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GetUserList'
produces:
- application/json
responses:
"200":
description: 获取用户列表,返回包括列表,总数,页码,每页大小
schema:
allOf:
- $ref: '#/definitions/response.Response'
- properties:
data:
$ref: '#/definitions/response.PageResult'
msg:
type: string
type: object
security:
- ApiKeyAuth: []
summary: 获取用户列表
tags:
- 用户管理
/user/grantRole:
post:
consumes:
- application/json
parameters:
- description: 用户ID, 角色ID
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.GrantRole'
produces:
- application/json
responses:
"200":
description: '{"code": 200, "data": [...]}'
schema:
$ref: '#/definitions/response.Response'
security:
- ApiKeyAuth: []
summary: 给用户分配角色
tags:
- 用户管理
/user/info:
get:
produces:
- application/json
responses:
"200":
description: '{"code": 200, "data": {}, "msg": "添加成功"}'
schema:
$ref: '#/definitions/response.Response'
security:
- ApiKeyAuth: []
summary: 当前登录用户
tags:
- 用户管理
/user/save:
post:
consumes:
- application/json
parameters:
- description: 用户信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/system.User'
produces:
- application/json
responses:
"200":
description: '{"code": 200, "data": {}, "msg": "添加成功"}'
schema:
$ref: '#/definitions/response.Response'
security:
- ApiKeyAuth: []
summary: 新增用户
tags:
- 用户管理
/user/update:
post:
consumes:
- application/json
parameters:
- description: 用户ID,用户信息
in: body
name: data
required: true
schema:
$ref: '#/definitions/system.User'
produces:
- application/json
responses:
"200":
description: '{"code": 200, "data": [...]}'
schema:
$ref: '#/definitions/response.Response'
security:
- ApiKeyAuth: []
summary: 更新用户
tags:
- 用户管理
/wiki-class/add:
post:
consumes:
- application/json
parameters:
- description: 添加分类
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateWikiClass'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"发布成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 添加分类
tags:
- 百科分类
/wiki-class/delete:
post:
consumes:
- application/json
parameters:
- description: 删除分类
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.IdsReq'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"删除成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 删除分类
tags:
- 百科分类
/wiki-class/detail:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 分类详情
tags:
- 百科分类
/wiki-class/list:
get:
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 分类列表
tags:
- 百科分类
/wiki-class/page:
post:
consumes:
- application/json
parameters:
- description: 分页获取分类列表
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.PageInfo'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 分类分页
tags:
- 百科分类
/wiki-class/update:
post:
consumes:
- application/json
parameters:
- description: 修改分类
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateWikiClass'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"发布成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 修改分类(可直接传入ossId修改图片)
tags:
- 百科分类
/wiki/add:
post:
consumes:
- application/json
parameters:
- description: 添加百科
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.CreateWiki'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"发布成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 添加百科
tags:
- 百科
/wiki/detail:
get:
parameters:
- description: id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"获取成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 百科详情
tags:
- 百科
/wiki/page:
post:
consumes:
- application/json
parameters:
- description: 百科分页
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.WikiPage'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"发布成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 分页
tags:
- 百科
/wiki/update:
post:
consumes:
- application/json
parameters:
- description: 修改百科
in: body
name: data
required: true
schema:
$ref: '#/definitions/request.UpdateWiki'
produces:
- application/json
responses:
"200":
description: '{"success":true,"data":{},"msg":"发布成功"}'
schema:
type: string
security:
- BearerAuth: []
summary: 修改百科
tags:
- 百科
securityDefinitions:
BearerAuth:
in: header
name: Authorization
type: apiKey
swagger: "2.0"