From ba5a64d9a8e3335803f03fdb61e7e8e01a9391dd Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Wed, 28 May 2025 08:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BF=85=E9=80=89=E4=BF=AE?= =?UTF-8?q?=E8=A7=84=E5=88=99=E5=9B=A0=E5=91=98=E5=B7=A5=E5=BC=82=E5=8A=A8?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=87=86=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre/Ghre_StudyRuleServices.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs index 37babf05..aaa16f0b 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRuleServices.cs @@ -1,4 +1,5 @@ using MongoDB.Driver.Linq; +using Tiobon.Core.Model.Models.RootTkey.Interface; using static Tiobon.Core.Model.Consts; namespace Tiobon.Core.Services; @@ -322,7 +323,7 @@ public class Ghre_StudyRuleServices : BaseServices().FirstAsync(x => x.Id == ruleId); @@ -437,12 +438,12 @@ public class Ghre_StudyRuleServices : BaseServices() - .Where(x => x.StudyRuleId != ruleId && x.StaffId == staff.StaffID) + .Where(x => x.StudyRuleId != null && x.StaffId == staff.StaffID) .WhereIF(!string.IsNullOrWhiteSpace(rule.Year), x => x.Year == rule.Year) .WhereIF(rule.CourseId != null, x => x.CourseId == rule.CourseId) .WhereIF(rule.CourseSceneId != null, x => x.CourseSceneId == rule.CourseSceneId) - //.AS("Ghre_StudyRecord_V") - .FirstAsync(); + //.AS("Ghre_StudyRecord_V") + .ClearFilter().FirstAsync(); if (record is null) { inserts.Add(new Ghre_StudyRecord() @@ -460,7 +461,8 @@ public class Ghre_StudyRuleServices : BaseServices().Where(x => x.Id == ruleId) .SetColumns(it => new Ghre_StudyRule() { Result = E.Message })