补齐 admin 100108 联调入口;track 优先用缓存签收照,上传失败回退 dataURI,日志截断大图。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user