From a66ab36177533fe8636f8b11f4a7035c06a1dbf1 Mon Sep 17 00:00:00 2001 From: wyw <571921741@qq.com> Date: Mon, 23 Mar 2026 08:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E5=88=A0=E9=99=A4=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E6=8F=90=E9=86=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/SEController/SECoursewearlibrary.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SECoursewearlibrary.cs b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SECoursewearlibrary.cs index f295a00..371a4da 100644 --- a/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SECoursewearlibrary.cs +++ b/APT.MicroApi/APT.SC.WebApi/Controllers/Api/SEController/SECoursewearlibrary.cs @@ -36,13 +36,16 @@ namespace APT.SE.WebApi.Controllers.Api var Detail = entity.Nav_Detail; entity.Nav_Detail = null; + if (Files != null && Files.Count() > 1) { throw new Exception("课件只能单一文件"); } if (entity.FILE_DB_ID.HasValue && Files != null && Files.Count > 0) { - throw new Exception("视频和附件只能有一个!");//不然到时候 考试 看视频或者附件不好处理 + int fileCount = Files.Where(e => !e.IS_DELETED).Count(); + if (fileCount > 0) + throw new Exception("视频和附件只能有一个!");//不然到时候 考试 看视频或者附件不好处理 } if (entity.SCOREPASS == 0) {