feat(FEAT-MO-001): 增加市场概览分模块接口
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user