From cccee7f86e0a758eaca654e35487b4a4e6705671 Mon Sep 17 00:00:00 2001 From: cjy Date: Mon, 26 Jan 2026 09:24:35 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/bundle/bundleBalance.go | 5 +++++ pkg/service/cast/report.go | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/pkg/service/bundle/bundleBalance.go b/pkg/service/bundle/bundleBalance.go index 9820a51..43e8335 100644 --- a/pkg/service/bundle/bundleBalance.go +++ b/pkg/service/bundle/bundleBalance.go @@ -313,6 +313,11 @@ func WorkAnalysisConfirm(c *gin.Context) { // 确认数据分析并扣除余量 service.Error(c, errors.New("数据分析不是待确认状态")) return } + artistID, _ := strconv.ParseUint(analysisInfoRes.ArtistID, 10, 64) + if artistID != uint64(userInfo.ID) { + service.Error(c, errors.New("非本人数据分析,无法操作")) + return + } var addBalanceReq bundle.AddBundleBalanceReq addBalanceReq.UserId = int32(userInfo.ID) diff --git a/pkg/service/cast/report.go b/pkg/service/cast/report.go index 3c08ab1..d716d09 100644 --- a/pkg/service/cast/report.go +++ b/pkg/service/cast/report.go @@ -421,9 +421,13 @@ func UpdateCompetitiveReportStatus(ctx *gin.Context) { service.Error(ctx, errors.New("非法操作")) return } - if req.ConfirmStatus != 1 && req.ConfirmStatus != 2 { - service.Error(ctx, errors.New("非法操作")) - return + // 当 WorkAction = 1(确认)时,ConfirmStatus 必须为 1(通过)、2(驳回)或 3(失败) + // 当 WorkAction = 6(阅读)时,不需要 ConfirmStatus + if req.WorkAction == 1 { + if req.ConfirmStatus != 1 && req.ConfirmStatus != 2 && req.ConfirmStatus != 3 { + service.Error(ctx, errors.New("非法操作")) + return + } } // 当 WorkAction == 1(确认)且 ConfirmStatus == 1(通过)时,需要检查并扣减余额