From 2b444abe1092ba3ab67dc430a264ed4f8abd1417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=B7=E6=AD=A6=20=E9=BB=84?= <865114447@qq.com> Date: Mon, 6 Jul 2026 15:47:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QYZH.InteractiveMagazine.Repository/Core/SqlSugarExtension.cs | 4 ++-- QYZH.InteractiveMagazine.Service/UserAnswerTaskService.cs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/QYZH.InteractiveMagazine.Repository/Core/SqlSugarExtension.cs b/QYZH.InteractiveMagazine.Repository/Core/SqlSugarExtension.cs index 23b56f3..07b04e0 100644 --- a/QYZH.InteractiveMagazine.Repository/Core/SqlSugarExtension.cs +++ b/QYZH.InteractiveMagazine.Repository/Core/SqlSugarExtension.cs @@ -129,7 +129,7 @@ namespace QYZH.InteractiveMagazine.Repository.Core if (entityInfo.PropertyName == "CreatedAt" && (string.IsNullOrWhiteSpace(entityValue) || entityValue == DateTime.MinValue.ToString())) entityInfo.SetValue(DateTime.Now);//修改CreateTime字段 else if (entityInfo.PropertyName == "CreatedBy" && (string.IsNullOrWhiteSpace(entityValue))) - entityInfo.SetValue(currnetUserName);//修改创建人字段 + entityInfo.SetValue(currentUserName);//修改创建人字段 else if (entityInfo.PropertyName == "IsDeleted" && string.IsNullOrWhiteSpace(entityValue)) entityInfo.SetValue("0");//修改CreateTime字段 } @@ -140,7 +140,7 @@ namespace QYZH.InteractiveMagazine.Repository.Core if (entityInfo.PropertyName == "UpdatedAt" && (string.IsNullOrWhiteSpace(entityValue) || entityValue == DateTime.MinValue.ToString())) entityInfo.SetValue(DateTime.Now);//修改UpdatedTime字段 else if (entityInfo.PropertyName == "UpdatedBy" && (string.IsNullOrWhiteSpace(entityValue) || entityValue == "0")) - entityInfo.SetValue(currnetUserName);//修改更新人字段 + entityInfo.SetValue(currentUserName);//修改更新人字段 } }; return db; diff --git a/QYZH.InteractiveMagazine.Service/UserAnswerTaskService.cs b/QYZH.InteractiveMagazine.Service/UserAnswerTaskService.cs index eab2506..1930a15 100644 --- a/QYZH.InteractiveMagazine.Service/UserAnswerTaskService.cs +++ b/QYZH.InteractiveMagazine.Service/UserAnswerTaskService.cs @@ -1750,8 +1750,7 @@ public class UserAnswerTaskService( // 统计有题目的页面数(用于文章篇数计算) var pagesWithTasks = allTasks .Where(t => secondLevelPageIds.Contains(t.JournalPageId)) - .Select(t => t.JournalPageId) - .Distinct() + .Select(t => t.JournalPageId) .ToHashSet(); articleCount += pagesWithTasks.Count;