refactor(task): 重构任务服务和数据结构

This commit is contained in:
2026-06-12 15:29:05 +08:00
parent 1c6c9bae14
commit b3b111995e
7 changed files with 227 additions and 292 deletions

View File

@@ -13,7 +13,6 @@ import (
"strings"
"time"
"gitea.redpowerfuture.com/red-future/common/utils"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
@@ -302,12 +301,3 @@ func replaceURLParams(url string, params map[string]any) string {
return s
})
}
// InjectCallbackURL 将回调地址注入到请求体中
func InjectCallbackURL(ctx context.Context, payload map[string]any, callbackURL string) map[string]any {
if callbackURL == "" {
return payload
}
payload[callbackURL] = utils.GetCallbackURL(ctx, "/task/modelCallback")
return payload
}