feat(courier): 小飞侠签收照联调与 OSS 失败回退
CI / verify (push) Waiting to run

补齐 admin 100108 联调入口;track 优先用缓存签收照,上传失败回退 dataURI,日志截断大图。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-02 17:56:56 +08:00
parent c6b01def4c
commit e5fe8b903a
8 changed files with 183 additions and 40 deletions
@@ -59,4 +59,9 @@ export class AdminXiaofeixiaController {
getTrack(@Body() body: XiaofeixiaShipmentQueryDto) {
return this.service.getTrack(body);
}
@Post('get-sign-photos')
getSignPhotos(@Body() body: XiaofeixiaShipmentQueryDto) {
return this.service.getSignPhotos(body);
}
}
@@ -101,6 +101,19 @@ export class AdminXiaofeixiaService {
return this.wrap(() => this.courier.getTrack(query, options));
}
async getSignPhotos(dto: XiaofeixiaShipmentQueryDto) {
const query = this.mapShipmentQuery(dto);
const options = await this.callOptions();
return this.wrap(async () => {
const dataUris = await this.courier.getSignPhotos(query, options);
return {
count: dataUris.length,
// 联调预览用:完整 dataURI;日志侧已截断
data: dataUris,
};
});
}
private async callOptions() {
const fromDb = await this.fulfillmentProviderService.resolveDefaultXiaofeixiaConfig();
return fromDb ? { xiaofeixia: fromDb } : undefined;