From fbf24995b82fceff1baaa841243e49943918fb2f Mon Sep 17 00:00:00 2001 From: cjy Date: Tue, 13 Jan 2026 16:40:25 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=87=8F=E5=B0=91=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=9C=80=E8=A6=81=E4=BC=A0=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/cast/report.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pkg/service/cast/report.go b/pkg/service/cast/report.go index 2baef13..060ec20 100644 --- a/pkg/service/cast/report.go +++ b/pkg/service/cast/report.go @@ -34,6 +34,32 @@ func CreateCompetitiveReport(ctx *gin.Context) { } newCtx := NewCtxWithUserInfo(ctx) artistID, _ := strconv.ParseUint(req.ArtistID, 10, 64) + + // 通过接口查询艺人信息,自动填充艺人名字、手机号等信息 + var infoResp *accountFiee.UserInfoResponse + if config.AppConfig.System.AppMode != "dev" { + infoResp, err = service.AccountFieeProvider.Info(context.Background(), &accountFiee.InfoRequest{ + ID: artistID, + Domain: "app", + }) + zap.L().Info("CreateCompetitiveReport", zap.Any("infoResp", infoResp)) + if err != nil { + service.Error(ctx, err) + return + } + } else { + infoResp = &accountFiee.UserInfoResponse{ + Name: "小波", + TelNum: "18288888888", + SubNum: "FE00000", + } + } + + // 填充艺人信息到请求中 + req.ArtistName = infoResp.Name + req.ArtistPhone = infoResp.TelNum + req.SubNum = infoResp.SubNum + if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeCompetitiveValue); err != nil { if err != nil && err.Error() == e.ErrorBalanceInsufficient { service.Error(ctx, errors.New("该艺人竞品报告可用次数为0"))