feat(FEAT-MO-004): 实现指数板块详情分析页

This commit is contained in:
2026-08-25 00:16:43 +08:00
parent f8f4da93dc
commit 0131f863b6
32 changed files with 2262 additions and 8 deletions
+196
View File
@@ -40,6 +40,46 @@
"required": ["status", "detail"],
"type": "object"
},
"DetailAvailableViewsDto": {
"properties": {
"intraday": { "type": "boolean" },
"kline": { "type": "boolean" }
},
"required": ["kline", "intraday"],
"type": "object"
},
"DetailInstrumentDto": {
"properties": {
"code": { "type": "string" },
"name": { "type": "string" },
"type": { "enum": ["index", "sector"], "type": "string" }
},
"required": ["code", "name", "type"],
"type": "object"
},
"DetailQuoteDto": {
"properties": {
"changePercent": { "nullable": true, "type": "number" },
"direction": { "enum": ["up", "down", "flat"], "type": "string" },
"price": { "type": "number" },
"tradeDate": { "example": "20260818", "type": "string" }
},
"required": ["price", "direction", "tradeDate"],
"type": "object"
},
"DetailSeriesPointDto": {
"properties": {
"amount": { "nullable": true, "type": "number" },
"close": { "type": "number" },
"high": { "type": "number" },
"low": { "type": "number" },
"open": { "type": "number" },
"time": { "example": "20260818", "type": "string" },
"volume": { "nullable": true, "type": "number" }
},
"required": ["time", "open", "high", "low", "close"],
"type": "object"
},
"FundDataDto": {
"properties": {
"changePercent": { "type": "number" },
@@ -101,6 +141,40 @@
"required": ["status", "process", "checkedAt", "dependencies"],
"type": "object"
},
"IndexDetailDataDto": {
"properties": {
"availableViews": {
"$ref": "#/components/schemas/DetailAvailableViewsDto"
},
"instrument": { "$ref": "#/components/schemas/DetailInstrumentDto" },
"quote": { "$ref": "#/components/schemas/DetailQuoteDto" },
"series": {
"items": { "$ref": "#/components/schemas/DetailSeriesPointDto" },
"type": "array"
}
},
"required": ["instrument", "quote", "series", "availableViews"],
"type": "object"
},
"IndexDetailResponseDto": {
"properties": {
"asOf": { "format": "date-time", "type": "string" },
"data": {
"allOf": [{ "$ref": "#/components/schemas/IndexDetailDataDto" }],
"nullable": true,
"type": "object"
},
"snapshotId": { "type": "string" },
"source": { "enum": ["tdx"], "type": "string" },
"status": {
"enum": ["fresh", "delayed", "partial", "unavailable"],
"type": "string"
},
"warnings": { "items": { "type": "string" }, "type": "array" }
},
"required": ["snapshotId", "asOf", "source", "status", "warnings", "data"],
"type": "object"
},
"IndexQuoteDto": {
"properties": {
"changePercent": { "nullable": true, "type": "number" },
@@ -152,6 +226,40 @@
"required": ["items"],
"type": "object"
},
"SectorDetailDataDto": {
"properties": {
"availableViews": {
"$ref": "#/components/schemas/DetailAvailableViewsDto"
},
"instrument": { "$ref": "#/components/schemas/DetailInstrumentDto" },
"quote": { "$ref": "#/components/schemas/DetailQuoteDto" },
"series": {
"items": { "$ref": "#/components/schemas/DetailSeriesPointDto" },
"type": "array"
}
},
"required": ["instrument", "quote", "series", "availableViews"],
"type": "object"
},
"SectorDetailResponseDto": {
"properties": {
"asOf": { "format": "date-time", "type": "string" },
"data": {
"allOf": [{ "$ref": "#/components/schemas/SectorDetailDataDto" }],
"nullable": true,
"type": "object"
},
"snapshotId": { "type": "string" },
"source": { "enum": ["tdx"], "type": "string" },
"status": {
"enum": ["fresh", "delayed", "partial", "unavailable"],
"type": "string"
},
"warnings": { "items": { "type": "string" }, "type": "array" }
},
"required": ["snapshotId", "asOf", "source", "status", "warnings", "data"],
"type": "object"
},
"SectorQuoteDto": {
"properties": {
"changePercent": { "type": "number" },
@@ -401,6 +509,50 @@
"tags": ["market-overview"]
}
},
"/api/v1/market-overview/indices/{code}/detail": {
"get": {
"operationId": "MarketDetailController_getIndexDetail",
"parameters": [
{
"in": "query",
"name": "count",
"required": false,
"schema": {
"example": 120,
"maximum": 120,
"minimum": 1,
"type": "number"
}
},
{
"in": "query",
"name": "period",
"required": false,
"schema": { "enum": ["1d"], "type": "string" }
},
{
"description": "带市场后缀的指数代码",
"in": "path",
"name": "code",
"required": true,
"schema": { "example": "000001.SH" }
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/IndexDetailResponseDto"
}
}
},
"description": ""
}
},
"tags": ["market-overview-detail"]
}
},
"/api/v1/market-overview/sectors": {
"get": {
"operationId": "MarketOverviewController_getSectors",
@@ -418,6 +570,50 @@
"tags": ["market-overview"]
}
},
"/api/v1/market-overview/sectors/{code}/detail": {
"get": {
"operationId": "MarketDetailController_getSectorDetail",
"parameters": [
{
"in": "query",
"name": "count",
"required": false,
"schema": {
"example": 120,
"maximum": 120,
"minimum": 1,
"type": "number"
}
},
{
"in": "query",
"name": "period",
"required": false,
"schema": { "enum": ["1d"], "type": "string" }
},
{
"description": "带市场后缀的一级行业代码",
"in": "path",
"name": "code",
"required": true,
"schema": { "example": "881001.SH" }
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SectorDetailResponseDto"
}
}
},
"description": ""
}
},
"tags": ["market-overview-detail"]
}
},
"/api/v1/market-overview/short-term/conclusion": {
"get": {
"operationId": "ShortTermMarketController_getConclusion",