From 326a8acac903718012d88d66cb4c672e72e32634 Mon Sep 17 00:00:00 2001 From: WangLiZhao <1838393649@qq.com> Date: Wed, 1 Jul 2026 15:54:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(gateway):=20=E6=B7=BB=E5=8A=A0=E8=AE=A1?= =?UTF-8?q?=E8=B4=B9=E6=97=A5=E6=9C=9F=E5=AD=97=E6=AE=B5=E5=88=B0=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E8=AF=B7=E6=B1=82=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在CallbackPayload结构体中添加BillingDate字段 - 将任务的BillingData赋值给回调请求体的BillingDate - 保持现有回调功能的其他字段不变 --- service/gateway/gateway_http_service.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/service/gateway/gateway_http_service.go b/service/gateway/gateway_http_service.go index 24a2e9e..3831b2c 100644 --- a/service/gateway/gateway_http_service.go +++ b/service/gateway/gateway_http_service.go @@ -77,11 +77,12 @@ func UploadByTask(ctx context.Context, data []byte, fileExt string) (oss *Upload // CallbackPayload 回调请求体 type CallbackPayload struct { - TaskId string `json:"task_id"` - State int `json:"state"` - OssFile string `json:"oss_file"` - FileType string `json:"file_type"` - ErrorMsg string `json:"error_msg"` + TaskId string `json:"task_id"` + State int `json:"state"` + OssFile string `json:"oss_file"` + FileType string `json:"file_type"` + ErrorMsg string `json:"error_msg"` + BillingDate map[string]any `json:"billing_data"` } // TriggerCallback 任务的回调 @@ -104,6 +105,7 @@ func TriggerCallback(ctx context.Context, t *entity.ModelGatewayTask) { if !g.IsEmpty(t.ResultFile) { payload.OssFile = t.ResultFile.OssFile payload.FileType = t.ResultFile.FileType + payload.BillingDate = t.BillingData } jsonData, err := json.Marshal(payload) if err != nil {