From a989dae45a2b92fb35c2564f02771f3831a9c52f Mon Sep 17 00:00:00 2001 From: lzh <1625167628@qq.com> Date: Thu, 16 Oct 2025 09:18:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=BF=80=E6=B4=BB=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/router/bundle.go | 1 + pkg/service/bundle/bundleBalance.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/pkg/router/bundle.go b/pkg/router/bundle.go index 577ffc6..84d7c4f 100644 --- a/pkg/router/bundle.go +++ b/pkg/router/bundle.go @@ -33,6 +33,7 @@ func BundleRouter(r *gin.RouterGroup) { { bundleBalance.POST("list", bundle.GetBundleBalance) bundleBalance.POST("used-record", bundle.GetUsedRecordList) + bundleBalance.POST("activate", bundle.BundleActivate) } } bundleClientRouteV2 := bundleRoute.Group("system/v2") diff --git a/pkg/service/bundle/bundleBalance.go b/pkg/service/bundle/bundleBalance.go index fe011f0..8cb5b97 100644 --- a/pkg/service/bundle/bundleBalance.go +++ b/pkg/service/bundle/bundleBalance.go @@ -248,3 +248,17 @@ func CastLogConfirm(ctx *gin.Context) { } service.Success(ctx, res) } + +func BundleActivate(ctx *gin.Context) { + var req bundle.BundleActivateReq + if err := ctx.ShouldBindJSON(&req); err != nil { + service.Error(ctx, err) + return + } + res, err := service.BundleProvider.BundleActivate(context.Background(), &req) + if err != nil { + service.Error(ctx, err) + return + } + service.Success(ctx, res) +}