From f3f157fe23b1fa440be5a86607f1313e1c9517bd Mon Sep 17 00:00:00 2001 From: daiyb <570956418@qq.com> Date: Thu, 18 Dec 2025 20:39:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=94=E5=9B=9E=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/cast/media.go | 2 +- pkg/service/import/binding.go | 2 +- pkg/service/import/publish.go | 6 +++--- pkg/service/import/publishV4.go | 2 +- pkg/service/taskbench/taskBench.go | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/service/cast/media.go b/pkg/service/cast/media.go index 609f77e..f0b7f1b 100644 --- a/pkg/service/cast/media.go +++ b/pkg/service/cast/media.go @@ -183,7 +183,7 @@ func UpdateMediaAccount(ctx *gin.Context) { } userID, _ := strconv.ParseInt(req.ArtistUuid, 10, 64) if req.MediaAccountUuid == "" { - if err = CheckUserBundleBalance(int32(userID), modelCast.BalanceTypeAccountValue); err != nil { + if _, err = CheckUserBundleBalance(int32(userID), modelCast.BalanceTypeAccountValue); err != nil { service.Error(ctx, err) return } diff --git a/pkg/service/import/binding.go b/pkg/service/import/binding.go index 95727a2..5bbe1c3 100644 --- a/pkg/service/import/binding.go +++ b/pkg/service/import/binding.go @@ -107,7 +107,7 @@ func ImportBind(c *gin.Context) { log.Printf(errors.New("查询平台信息失败:").Error()) continue } - if err = cast.CheckUserBundleBalance(int32(res.UserList[0].Id), modelCast.BalanceTypeAccountValue); err != nil { + if _, err = cast.CheckUserBundleBalance(int32(res.UserList[0].Id), modelCast.BalanceTypeAccountValue); err != nil { failedRecords = append(failedRecords, FailedRecord{ Name: artist.Name, Msg: fmt.Sprintf("查询检查用户账户数量失败: %s", err.Error()), diff --git a/pkg/service/import/publish.go b/pkg/service/import/publish.go index 4a9f0a9..cdda10a 100644 --- a/pkg/service/import/publish.go +++ b/pkg/service/import/publish.go @@ -127,7 +127,7 @@ func ImportPublish(c *gin.Context) { } } - if err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { + if _, err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { failedRecords = append(failedRecords, FailedRecord{ Name: artist.Name, Msg: fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()), @@ -346,7 +346,7 @@ func ImportPublishV2(c *gin.Context) { } } - if err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { + if _, err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { failedRecords = append(failedRecords, FailedRecord{ Name: artist.Name, Msg: fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()), @@ -771,7 +771,7 @@ func ImportPublishV3(c *gin.Context) { } } - if err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { + if _, err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { failedRecords = append(failedRecords, FailedRecord{ Name: artist.Name, Msg: fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()), diff --git a/pkg/service/import/publishV4.go b/pkg/service/import/publishV4.go index eda7e0c..f2560d9 100644 --- a/pkg/service/import/publishV4.go +++ b/pkg/service/import/publishV4.go @@ -132,7 +132,7 @@ func ImportPublishV4(c *gin.Context) { } //--------------------------------------------------检查用户视频数量 - if err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { + if _, err = cast.CheckUserBundleBalance(int32(list.UserList[0].Id), modelCast.BalanceTypeVideoValue); err != nil { failedRecords = append(failedRecords, FailedRecord{ Name: artist.Name, Msg: fmt.Sprintf("检查用户视频可消耗数量: %s", err.Error()), diff --git a/pkg/service/taskbench/taskBench.go b/pkg/service/taskbench/taskBench.go index ffde5c7..0ad9aea 100644 --- a/pkg/service/taskbench/taskBench.go +++ b/pkg/service/taskbench/taskBench.go @@ -398,7 +398,7 @@ func UpdateWorkImageWithTaskUUID(ctx *gin.Context) { req.ArtistPhone = infoResp.TelNum req.ArtistPhoneAreaCode = infoResp.TelAreaCode artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64) - if err = castService.CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil { + if _, err = castService.CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeImageValue); err != nil { service.Error(ctx, err) return } @@ -467,7 +467,7 @@ func UpdateWorkVideoWithUUID(ctx *gin.Context) { } } artistID, _ := strconv.ParseUint(req.ArtistUuid, 10, 64) - if err = castService.CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeVideoValue); err != nil { + if _, err = castService.CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeVideoValue); err != nil { service.Error(ctx, err) return }