From 79d39125ff161d4f6fba7d407aa52e33166a55eb Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 8 Sep 2025 15:35:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=96=E8=80=85=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Common/CommonDocumentService.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs index 5ea3f87dc..b10058954 100644 --- a/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Common/CommonDocumentService.cs @@ -16,10 +16,20 @@ namespace IRaCIS.Core.Application.Service /// 系统模板文档配置表 /// [ApiExplorerSettings(GroupName = "Common")] - public class CommonDocumentService(IRepository _commonDocumentRepository, + public class CommonDocumentService(IRepository _commonDocumentRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IWebHostEnvironment _hostEnvironment) : BaseService, ICommonDocumentService { + public async Task GetCommonDocument(string code) + { + var first = await _commonDocumentRepository.Where(t => t.Code == code) + .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.UserRoleId }) + .FirstNotNullAsync(); + + + return first; + } + [HttpPost] public async Task> GetCommonDocumentList(CommonDocumentQuery queryCommonDocument) {