From 02e00f9d4904ff70446f93cd71ae14f256fde9ab Mon Sep 17 00:00:00 2001 From: cjy Date: Tue, 3 Mar 2026 15:53:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=A2=9E=E5=8A=A0=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/service/cast/report.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/service/cast/report.go b/pkg/service/cast/report.go index b1ff97b6..99ae78ad 100644 --- a/pkg/service/cast/report.go +++ b/pkg/service/cast/report.go @@ -416,6 +416,13 @@ func ImportCompetitiveReportBatch(ctx *gin.Context) { // 截断超长字段(按AI生成的字段长度要求) competitorReportData = truncateCompetitorReportData(competitorReportData) + // 验证标题长度(数据库字段为varchar(50)) + if len(temp.Title) > 50 { + temp.Remark = "标题长度超出限制" + req.Reports = append(req.Reports, temp) + continue + } + // 验证必填字段 if artistNum == "" { temp.Remark = "艺人编号不能为空"