From a34c47dc3cf245eb3b438c4cfd134d5daf50d396 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 21 Oct 2025 15:40:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=BD=93=E5=89=8D=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E7=94=A8=E6=88=B7=E5=8D=8F=E8=AE=AE=E5=92=8C?= =?UTF-8?q?=E9=9A=90=E7=A7=81=E9=87=87=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 13 +++++++++++++ .../Service/Document/UserAgreementService.cs | 15 +++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 5727ff903..b66a1f1ce 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -2002,6 +2002,19 @@ + + + 获取当前版本的用户协议和隐私采集 + + + + + + 根据Id获取用户协议和隐私采集 + + + + 设置为当前版本 diff --git a/IRaCIS.Core.Application/Service/Document/UserAgreementService.cs b/IRaCIS.Core.Application/Service/Document/UserAgreementService.cs index 19b83ad5c..a9bc6396b 100644 --- a/IRaCIS.Core.Application/Service/Document/UserAgreementService.cs +++ b/IRaCIS.Core.Application/Service/Document/UserAgreementService.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Application.Service.Interface; using IRaCIS.Core.Application.Service.DTO; +using Microsoft.AspNetCore.Authorization; namespace IRaCIS.Core.Application.Service; /// @@ -49,6 +50,20 @@ public class UserAgreementService(IRepository _userAgreementRepos return pageList; } + /// + /// 获取当前版本的用户协议和隐私采集 + /// + /// + [AllowAnonymous] + [HttpPost] + public async Task> GetCurrentVersionUserAgreements() + { + var userAgreementList = await _userAgreementRepository.Where(x=>x.IsCurrentVersion) + .ProjectTo(_mapper.ConfigurationProvider) + .ToListAsync(); + return userAgreementList; + } + /// /// 根据Id获取用户协议和隐私采集 ///