feat(FEAT-MO-001): 增加市场概览分模块接口

This commit is contained in:
2026-08-18 13:31:24 +08:00
parent c2fa929936
commit 15a25002ce
12 changed files with 834 additions and 1 deletions
@@ -0,0 +1,47 @@
import { Controller, Get, Inject } from '@nestjs/common';
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
import {
BreadthResponseDto,
FundsResponseDto,
IndicesResponseDto,
SectorsResponseDto,
SummaryResponseDto,
} from './market-overview.dto';
import { MarketOverviewService } from './market-overview.service';
@ApiTags('market-overview')
@Controller('market-overview')
export class MarketOverviewController {
constructor(@Inject(MarketOverviewService) private readonly service: MarketOverviewService) {}
@Get('summary')
@ApiOkResponse({ type: SummaryResponseDto })
getSummary(): Promise<SummaryResponseDto> {
return this.service.getSummary();
}
@Get('indices')
@ApiOkResponse({ type: IndicesResponseDto })
getIndices(): Promise<IndicesResponseDto> {
return this.service.getIndices();
}
@Get('breadth')
@ApiOkResponse({ type: BreadthResponseDto })
getBreadth(): Promise<BreadthResponseDto> {
return this.service.getBreadth();
}
@Get('sectors')
@ApiOkResponse({ type: SectorsResponseDto })
getSectors(): Promise<SectorsResponseDto> {
return this.service.getSectors();
}
@Get('funds')
@ApiOkResponse({ type: FundsResponseDto })
getFunds(): Promise<FundsResponseDto> {
return this.service.getFunds();
}
}