数据库文档编写,开发规范文档,数据库接入
This commit is contained in:
@@ -8,8 +8,18 @@ export type DeliveryAnalysisData = {
|
||||
endIso: string
|
||||
}
|
||||
|
||||
export async function fetchDeliveryAnalysis(period: string): Promise<DeliveryAnalysisData> {
|
||||
const { startIso, endIso } = computeDateRange(period)
|
||||
export async function fetchDeliveryAnalysis(period: string, range?: { start: string; end: string } | null): Promise<DeliveryAnalysisData> {
|
||||
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 trendList = await rpcOrEmptyArray('rpc_delivery_efficiency_daily', {
|
||||
p_start: startIso,
|
||||
|
||||
Reference in New Issue
Block a user