feat: 用户中心

This commit is contained in:
Blizzard
2026-02-11 14:33:00 +08:00
parent 4ccab96ca2
commit 112a1f439c
17 changed files with 1571 additions and 138 deletions
+546 -48
View File
@@ -236,6 +236,104 @@
}
}
},
"/classify/myClassifyLog": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"识别相关"
],
"summary": "我的植物识别记录",
"parameters": [
{
"description": "分页",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.PageInfo"
}
}
],
"responses": {
"200": {
"description": "识别记录",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"msg": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/classify/plant": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"识别相关"
],
"summary": "base64植物识别",
"parameters": [
{
"type": "file",
"description": "植物识别",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "文件OCR",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"msg": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/client/delete": {
"post": {
"security": [
@@ -488,6 +586,139 @@
}
}
},
"/config/level/add": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"等级配置"
],
"summary": "添加等级配置",
"parameters": [
{
"description": "添加等级配置",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.CreateLevelConf"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"添加成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/config/level/detail": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"等级配置"
],
"summary": "等级配置详情",
"parameters": [
{
"type": "string",
"description": "等级配置id",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/config/level/list": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"等级配置"
],
"summary": "等级配置列表",
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/config/level/update": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"等级配置"
],
"summary": "修改等级配置",
"parameters": [
{
"description": "修改等级配置",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.UpdateLevelConf"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/menu/delete": {
"get": {
"security": [
@@ -821,54 +1052,6 @@
}
}
},
"/ocr/base64": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"识别相关"
],
"summary": "base64植物识别",
"parameters": [
{
"type": "file",
"description": "植物识别",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "文件OCR",
"schema": {
"allOf": [
{
"$ref": "#/definitions/response.Response"
},
{
"type": "object",
"properties": {
"msg": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/oss/delete": {
"post": {
"security": [
@@ -1247,6 +1430,44 @@
}
}
},
"/plant/growth/add": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"我的植物"
],
"summary": "添加成长记录",
"parameters": [
{
"description": "添加成长记录",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.CreateGrowthRecord"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"添加成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/plant/page": {
"post": {
"security": [
@@ -1285,6 +1506,77 @@
}
}
},
"/plant/plan/add": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"我的植物"
],
"summary": "添加养护事项",
"parameters": [
{
"description": "添加养护事项",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.CreateCarePlan"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"添加成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/plant/plan/delete": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"我的植物"
],
"summary": "删除养护事项",
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/plant/todayTask": {
"get": {
"security": [
@@ -1542,6 +1834,68 @@
}
}
},
"/profile/detail": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"个人中心"
],
"summary": "用户详情",
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"查询成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/profile/update": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"个人中心"
],
"summary": "修改用户信息",
"parameters": [
{
"description": "修改用户信息",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/request.UpdateProfile"
}
}
],
"responses": {
"200": {
"description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
"schema": {
"type": "string"
}
}
}
}
},
"/role/delete": {
"post": {
"description": "删除角色",
@@ -2204,6 +2558,30 @@
}
}
},
"/user/info": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"produces": [
"application/json"
],
"tags": [
"用户管理"
],
"summary": "当前登录用户",
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": {}, \"msg\": \"添加成功\"}",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/user/save": {
"post": {
"security": [
@@ -2680,6 +3058,29 @@
}
}
},
"request.CreateCarePlan": {
"type": "object",
"required": [
"plantId"
],
"properties": {
"icon": {
"description": "icon信息",
"type": "string"
},
"name": {
"description": "农事名称",
"type": "string"
},
"period": {
"description": "周期",
"type": "integer"
},
"plantId": {
"type": "string"
}
}
},
"request.CreateComment": {
"type": "object",
"required": [
@@ -2697,6 +3098,56 @@
}
}
},
"request.CreateGrowthRecord": {
"type": "object",
"required": [
"plantId"
],
"properties": {
"content": {
"type": "string"
},
"desc": {
"type": "string"
},
"name": {
"type": "string"
},
"ossIds": {
"type": "array",
"items": {
"type": "string"
}
},
"plantId": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"request.CreateLevelConf": {
"type": "object",
"properties": {
"level": {
"description": "等级数值",
"type": "integer"
},
"minSunlight": {
"description": "达到该等级所需的最小阳光值",
"type": "integer"
},
"perks": {
"description": "解锁权益描述 (e.g., \"解锁智能诊断\")",
"type": "string"
},
"title": {
"description": "等级称号 (e.g., \"萌芽园丁\")",
"type": "string"
}
}
},
"request.CreateMyPlant": {
"type": "object",
"properties": {
@@ -3124,6 +3575,33 @@
}
}
},
"request.UpdateLevelConf": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"level": {
"description": "等级数值",
"type": "integer"
},
"minSunlight": {
"description": "达到该等级所需的最小阳光值",
"type": "integer"
},
"perks": {
"description": "解锁权益描述 (e.g., \"解锁智能诊断\")",
"type": "string"
},
"title": {
"description": "等级称号 (e.g., \"萌芽园丁\")",
"type": "string"
}
}
},
"request.UpdateMyPlant": {
"type": "object",
"required": [
@@ -3188,6 +3666,26 @@
}
}
},
"request.UpdateProfile": {
"type": "object",
"properties": {
"avatarId": {
"type": "string"
},
"currentSunlight": {
"type": "integer"
},
"levelId": {
"type": "string"
},
"nickname": {
"type": "string"
},
"totalSunlight": {
"type": "integer"
}
}
},
"request.UpdateTopic": {
"type": "object",
"required": [