This commit is contained in:
2026-01-29 15:03:38 +08:00
parent 2363a51a6a
commit 2fea046981
5 changed files with 42 additions and 53 deletions

View File

@@ -93,12 +93,6 @@ func (s *PDFGenService) GenerateGuangzhouPDF(ctx context.Context, req *GenerateP
return nil, fmt.Errorf("序列化请求失败: %w", err)
}
// Debug打印请求体预览最多1024字节防止日志过大
bodyPreview := reqBody
if len(bodyPreview) > 1024 {
bodyPreview = bodyPreview[:1024]
}
// 构建请求URL
url := fmt.Sprintf("%s%s", s.baseURL, s.apiPath)
@@ -117,7 +111,7 @@ func (s *PDFGenService) GenerateGuangzhouPDF(ctx context.Context, req *GenerateP
s.logger.Info("开始调用PDF生成服务",
zap.String("url", url),
zap.Int("data_count", len(req.Data)),
zap.ByteString("body_preview", bodyPreview),
zap.ByteString("reqBody", reqBody),
)
resp, err := s.client.Do(httpReq)