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 }