From 92e61f25c17b76a22a45052f0fafda355f8bde0b Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Mon, 15 Jul 2024 10:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E8=AE=B2=E5=B8=88?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=20=E9=99=84=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ghre_TeacherAttachment.Dto.EditInput.cs | 2 +- .../Ghre_TeacherAttachment.Dto.InsertInput.cs | 2 +- .../Ghre/Ghre_TeacherAttachment.Dto.View.cs | 2 +- .../Ghre/Ghre_TeacherServices.cs | 17 ++++++++--------- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Tiobon.Core.Model/Edit/Ghre/Ghre_TeacherAttachment.Dto.EditInput.cs b/Tiobon.Core.Model/Edit/Ghre/Ghre_TeacherAttachment.Dto.EditInput.cs index 4759055a..9c88cc2e 100644 --- a/Tiobon.Core.Model/Edit/Ghre/Ghre_TeacherAttachment.Dto.EditInput.cs +++ b/Tiobon.Core.Model/Edit/Ghre/Ghre_TeacherAttachment.Dto.EditInput.cs @@ -27,6 +27,6 @@ namespace Tiobon.Core.Model.Models { [NotMapped] - public List Attachments { get; set; } + public List Attachments { get; set; } } } diff --git a/Tiobon.Core.Model/Insert/Ghre/Ghre_TeacherAttachment.Dto.InsertInput.cs b/Tiobon.Core.Model/Insert/Ghre/Ghre_TeacherAttachment.Dto.InsertInput.cs index 22cf1f08..19ec3207 100644 --- a/Tiobon.Core.Model/Insert/Ghre/Ghre_TeacherAttachment.Dto.InsertInput.cs +++ b/Tiobon.Core.Model/Insert/Ghre/Ghre_TeacherAttachment.Dto.InsertInput.cs @@ -26,6 +26,6 @@ namespace Tiobon.Core.Model.Models public class InsertGhre_TeacherAttachmentInput : Ghre_TeacherAttachmentBase { [NotMapped] - public List Attachments { get; set; } + public List Attachments { get; set; } } } diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_TeacherAttachment.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_TeacherAttachment.Dto.View.cs index 410c4a8e..dcbe519d 100644 --- a/Tiobon.Core.Model/View/Ghre/Ghre_TeacherAttachment.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghre/Ghre_TeacherAttachment.Dto.View.cs @@ -32,5 +32,5 @@ public class Ghre_TeacherAttachmentDto : Ghre_TeacherAttachment /// public string UpdateDataInfo { get; set; } - public List Attachments { get; set; } = new List(); + public List Attachments { get; set; } = new List(); } diff --git a/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs b/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs index 0ebcd2ff..c9623531 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_TeacherServices.cs @@ -8,7 +8,6 @@ using Tiobon.Core.Common; using Tiobon.Core.Model; using AgileObjects.AgileMapper; using Newtonsoft.Json.Linq; -using Tiobon.Core.Common.DB.Dapper.Extensions; using Newtonsoft.Json; namespace Tiobon.Core.Services; @@ -19,17 +18,17 @@ namespace Tiobon.Core.Services; public class Ghre_TeacherServices : BaseServices, IGhre_TeacherServices { private readonly IBaseRepository _dal; - private IGhrs_AttachmentServices _ghrs_AttachmentServices; + private IGhre_AttachmentServices _ghre_AttachmentServices; private IGhre_TeacherAttachmentServices _ghre_TeacherAttachmentServices; public Ghre_TeacherServices(ICaching caching, - IGhrs_AttachmentServices ghrs_AttachmentServices, + IGhre_AttachmentServices ghre_AttachmentServices, IGhre_TeacherAttachmentServices ghre_TeacherAttachmentServices, IBaseRepository dal) { this._dal = dal; base.BaseDal = dal; base._caching = caching; - _ghrs_AttachmentServices = ghrs_AttachmentServices; + _ghre_AttachmentServices = ghre_AttachmentServices; _ghre_TeacherAttachmentServices = ghre_TeacherAttachmentServices; } @@ -174,7 +173,7 @@ FROM (SELECT A.*, var ids = entitys.Select(x => x.Id).ToList(); var teacherAttachments = await _ghre_TeacherAttachmentServices.QueryDto(x => ids.Contains(x.TeacherId.Value)); var ids1 = teacherAttachments.Select(x => x.Id.ToString()).ToList(); - var attachments = await _ghrs_AttachmentServices.QueryDto(x => ids1.Contains(x.TableName)); + var attachments = await _ghre_AttachmentServices.QueryDto(x => ids1.Contains(x.TableName)); teacherAttachments.ForEach(x => { @@ -221,8 +220,8 @@ FROM (SELECT A.*, if (insert.Attachments != null && insert.Attachments.Any()) for (int j = 0; j < insert.Attachments.Count; j++) { - await Db.Updateable() - .SetColumns(it => new Ghrs_Attachment() { TableName = teacherAttachmentId.ToString(), UpdateTime = DateTime.Now }) + await Db.Updateable() + .SetColumns(it => new Ghre_Attachment() { TableName = teacherAttachmentId.ToString(), UpdateTime = DateTime.Now }) .Where(it => it.RelativePath == insert.Attachments[j].RelativePath) .ExecuteCommandAsync(); } @@ -260,8 +259,8 @@ FROM (SELECT A.*, if (insert.Attachments != null && insert.Attachments.Any()) for (int j = 0; j < insert.Attachments.Count; j++) { - await Db.Updateable() - .SetColumns(it => new Ghrs_Attachment() { TableName = TeacherAttachmentId.ToString(), UpdateTime = DateTime.Now }) + await Db.Updateable() + .SetColumns(it => new Ghre_Attachment() { TableName = TeacherAttachmentId.ToString(), UpdateTime = DateTime.Now }) .Where(it => it.RelativePath == insert.Attachments[j].RelativePath) .ExecuteCommandAsync(); }