@@ -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;
|
||||
|
||||
/// <summary>
|
||||
@@ -49,6 +50,20 @@ public class UserAgreementService(IRepository<UserAgreement> _userAgreementRepos
|
||||
return pageList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前版本的用户协议和隐私采集
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public async Task<List<UserAgreementView>> GetCurrentVersionUserAgreements()
|
||||
{
|
||||
var userAgreementList = await _userAgreementRepository.Where(x=>x.IsCurrentVersion)
|
||||
.ProjectTo<UserAgreementView>(_mapper.ConfigurationProvider)
|
||||
.ToListAsync();
|
||||
return userAgreementList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id获取用户协议和隐私采集
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user