feat: 辅料功能、康正源拉取价格接口

This commit is contained in:
李琦
2026-09-30 17:02:54 +08:00
parent bfe50a8d67
commit 87c480f391
51 changed files with 4086 additions and 380 deletions

View File

@@ -97,12 +97,32 @@ export async function getFileTypes() {
return requestClient.get<FileTypeItem[]>(`${prefix}file-types`);
}
export async function syncFileGalleryFromOss() {
/** 规划 OSS 同步日期分组(full 全部 / incremental 从库内最新日期起) */
export async function planFileGalleryOssSync(data?: { mode?: 'full' | 'incremental' }) {
return requestClient.post<{
mode: 'full' | 'incremental';
prefixes: string[];
total: number;
since_date: string;
}>(`${prefix}sync-oss-plan`, data ?? {});
}
/** 从 OSS 同步一批(按日期 prefix + marker;全部组结束后 finalize=1) */
export async function syncFileGalleryFromOss(data?: {
limit?: number;
marker?: string;
prefix?: string;
finalize?: number;
}) {
return requestClient.post<{
scanned: number;
skipped: number;
synced: number;
}>(`${prefix}sync-oss`);
next_marker: string;
done: boolean;
folder_created: number;
prefix: string;
}>(`${prefix}sync-oss`, data ?? {});
}
/** 文件加入自定义分组 */