f
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user