f
This commit is contained in:
@@ -31,8 +31,16 @@ func (l *DownloadReportPdfLogic) DownloadReportPdf(req *types.DownloadReportPdfR
|
||||
return nil, fmt.Errorf("生成报告 PDF 失败: %w", err)
|
||||
}
|
||||
|
||||
fileKey := req.OrderNo
|
||||
if fileKey == "" {
|
||||
fileKey = req.OrderId
|
||||
}
|
||||
if fileKey == "" {
|
||||
fileKey = "unknown"
|
||||
}
|
||||
|
||||
resp = &types.DownloadReportPdfResp{
|
||||
FileName: fmt.Sprintf("report_%s.pdf", req.OrderNo),
|
||||
FileName: fmt.Sprintf("report_%s.pdf", fileKey),
|
||||
Content: pdfBytes,
|
||||
}
|
||||
return resp, nil
|
||||
|
||||
Reference in New Issue
Block a user