feat: 用户中心
This commit is contained in:
+546
-48
@@ -244,6 +244,104 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -496,6 +594,139 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -829,54 +1060,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -1255,6 +1438,44 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -1293,6 +1514,77 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -1550,6 +1842,68 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": "删除角色",
|
||||
@@ -2212,6 +2566,30 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -2688,6 +3066,29 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
@@ -2705,6 +3106,56 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
@@ -3132,6 +3583,33 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
@@ -3196,6 +3674,26 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
|
||||
Reference in New Issue
Block a user