From 1886935f4dc3850d71acb87b81a46f8b4ed72452 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Tue, 13 Jan 2026 16:00:32 +0800 Subject: [PATCH] =?UTF-8?q?Updata=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=AF=BC?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/bundle/bundleMetrics.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/service/bundle/bundleMetrics.go b/pkg/service/bundle/bundleMetrics.go index 1286e96..f4eb34e 100644 --- a/pkg/service/bundle/bundleMetrics.go +++ b/pkg/service/bundle/bundleMetrics.go @@ -17,7 +17,6 @@ import ( "strings" "time" - "github.com/duke-git/lancet/v2/datetime" "github.com/shopspring/decimal" "github.com/gin-gonic/gin" @@ -257,14 +256,16 @@ func MetricsVideoSubmitExport(ctx *gin.Context) { return } newCtx := serviceCast.NewCtxWithUserInfo(ctx) - t, err := time.Parse("2006-01", req.Month[0]) if err == nil { resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{ - SubmitStartTime: datetime.BeginOfMonth(t).Format(time.DateTime), - SubmitEndTime: datetime.EndOfMonth(t).Format(time.DateTime), - Page: 1, - PageSize: 99999, + SubmitTimeMonths: req.Month, + Page: 1, + PageSize: 99999, }) + if err != nil { + service.Error(ctx, errors.New(common.MetricsVideoSubmitExportFailed)) + return + } fmt.Printf("resp.Count: %v\n", resp.Count) } else { resp, err = service.CastProvider.WorkList(newCtx, &cast.WorkListReq{