数据库文档编写,开发规范文档,数据库接入

This commit is contained in:
comlibmb
2026-02-02 18:09:30 +08:00
parent 19970db288
commit 21149dd3fe
36 changed files with 3245 additions and 89 deletions

View File

@@ -11,8 +11,19 @@ export type MarketTrendsData = {
endIso: string
}
export async function fetchMarketTrends(period: string): Promise<MarketTrendsData> {
const { startIso, endIso } = computeDateRange(period)
export async function fetchMarketTrends(period: string, range?: { start: string; end: string } | null): Promise<MarketTrendsData> {
let startIso: string;
let endIso: string;
if (range != null && range.start && range.end) {
startIso = range.start;
endIso = range.end;
} else {
const computedRange = computeDateRange(period)
startIso = computedRange.startIso
endIso = computedRange.endIso
}
const startDate = toDateOnly(startIso)
const endDate = toDateOnly(endIso)