f
This commit is contained in:
@@ -54,7 +54,16 @@ func (l *DownloadReportPdfLogic) DownloadReportPdf(req *types.DownloadReportPdfR
|
||||
}
|
||||
|
||||
resp = &types.DownloadReportPdfResp{
|
||||
FileName: fmt.Sprintf("report_%s.pdf", req.OrderNo),
|
||||
FileName: func() string {
|
||||
fileKey := req.OrderNo
|
||||
if fileKey == "" {
|
||||
fileKey = orderId
|
||||
}
|
||||
if fileKey == "" {
|
||||
fileKey = "unknown"
|
||||
}
|
||||
return fmt.Sprintf("report_%s.pdf", fileKey)
|
||||
}(),
|
||||
Content: pdfBytes,
|
||||
}
|
||||
return resp, nil
|
||||
|
||||
Reference in New Issue
Block a user