feat: 徽章api
This commit is contained in:
+263
-13
@@ -594,6 +594,172 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/badge/add": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"徽章配置"
|
||||
],
|
||||
"summary": "添加徽章配置",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "添加徽章配置",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.CreateBadge"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"添加成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/badge/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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/badge/find": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"徽章配置"
|
||||
],
|
||||
"summary": "根据ID获取徽章配置",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "id",
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/badge/tree": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"徽章配置"
|
||||
],
|
||||
"summary": "获取徽章配置树形结构",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/badge/update": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"徽章配置"
|
||||
],
|
||||
"summary": "更新徽章配置",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "更新参数",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/request.UpdateBadge"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{\"success\":true,\"data\":{},\"msg\":\"更新成功\"}",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config/level/add": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -3066,6 +3232,48 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.CreateBadge": {
|
||||
"type": "object",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.CreateCarePlan": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3230,13 +3438,13 @@ const docTemplate = `{
|
||||
"request.CreateTopic": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_time": {
|
||||
"endTime": {
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_time": {
|
||||
"startTime": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
@@ -3583,6 +3791,54 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.UpdateBadge": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"request.UpdateLevelConf": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3680,17 +3936,8 @@ const docTemplate = `{
|
||||
"avatarId": {
|
||||
"type": "string"
|
||||
},
|
||||
"currentSunlight": {
|
||||
"type": "integer"
|
||||
},
|
||||
"levelId": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"totalSunlight": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3700,7 +3947,7 @@ const docTemplate = `{
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"end_time": {
|
||||
"endTime": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
@@ -3709,7 +3956,7 @@ const docTemplate = `{
|
||||
"remark": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_time": {
|
||||
"startTime": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
@@ -3989,6 +4236,9 @@ const docTemplate = `{
|
||||
"parentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"permission": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user