清除文档token

Uat_Study
hang 2022-06-02 11:46:44 +08:00
parent 4935cb286d
commit 0f1d2ddb7f
5 changed files with 44 additions and 20 deletions

View File

@ -111,6 +111,9 @@ namespace IRaCIS.Core.API
services.AddMediatR(typeof(ConsistencyVerificationHandler).Assembly); services.AddMediatR(typeof(ConsistencyVerificationHandler).Assembly);
// EasyCaching 缓存 // EasyCaching 缓存
services.AddEasyCachingSetup(); services.AddEasyCachingSetup();
//services.AddDistributedMemoryCache();
// hangfire 定时任务框架 有界面,更友好~ // hangfire 定时任务框架 有界面,更友好~
services.AddhangfireSetup(_configuration); services.AddhangfireSetup(_configuration);
// QuartZ 定时任务框架 使用了hangfire 暂时不用,后续需要可以打开,已经配好 // QuartZ 定时任务框架 使用了hangfire 暂时不用,后续需要可以打开,已经配好

View File

@ -900,16 +900,36 @@
<member name="T:IRaCIS.Core.Application.ViewModel.FrontAuditConfigView"> <member name="T:IRaCIS.Core.Application.ViewModel.FrontAuditConfigView">
<summary> FrontAuditConfigView 列表视图模型 </summary> <summary> FrontAuditConfigView 列表视图模型 </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.DataFromItem"> <member name="T:IRaCIS.Core.Application.ViewModel.FullyReplicated">
<summary>
完全复制对象
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.DataFromItemGuid">
<summary> <summary>
数据来源对象 数据来源对象
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.ThisTiem"> <member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.ThisItemGuid">
<summary> <summary>
要赋值到的对象 要赋值到的对象
</summary> </summary>
</member> </member>
<member name="T:IRaCIS.Core.Application.ViewModel.CopyOtherToThisItem">
<summary>
复制其他对象到当前对象
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.CopyOtherToThisItem.DataSourceGuids">
<summary>
数据源Guids
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.CopyOtherToThisItem.AddItemGuid">
<summary>
添加对象的Guid
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.FrontAuditConfigQuery"> <member name="T:IRaCIS.Core.Application.ViewModel.FrontAuditConfigQuery">
<summary>FrontAuditConfigQuery 列表查询参数模型</summary> <summary>FrontAuditConfigQuery 列表查询参数模型</summary>
</member> </member>

View File

@ -149,7 +149,7 @@ namespace IRaCIS.Core.Application.Services
FileType = needConfirmedUserType.SystemDocument.FileType.Value, FileType = needConfirmedUserType.SystemDocument.FileType.Value,
UpdateTime = needConfirmedUserType.SystemDocument.UpdateTime, UpdateTime = needConfirmedUserType.SystemDocument.UpdateTime,
FullFilePath = needConfirmedUserType.SystemDocument.Path + "?access_token=" + _userInfo.UserToken, FullFilePath = needConfirmedUserType.SystemDocument.Path ,
ConfirmUserId = confirm.ConfirmUserId, ConfirmUserId = confirm.ConfirmUserId,
ConfirmTime = confirm.ConfirmTime, ConfirmTime = confirm.ConfirmTime,
@ -172,7 +172,7 @@ namespace IRaCIS.Core.Application.Services
Id = trialDoc.Id, Id = trialDoc.Id,
IsSystemDoc = false, IsSystemDoc = false,
CreateTime = trialDoc.CreateTime, CreateTime = trialDoc.CreateTime,
FullFilePath = trialDoc.Path + "?access_token=" + _userInfo.UserToken, FullFilePath = trialDoc.Path ,
IsDeleted = trialDoc.IsDeleted, IsDeleted = trialDoc.IsDeleted,
Name = trialDoc.Name, Name = trialDoc.Name,
Path = trialDoc.Path, Path = trialDoc.Path,
@ -292,7 +292,7 @@ namespace IRaCIS.Core.Application.Services
UserName = trialUser.User.UserName, UserName = trialUser.User.UserName,
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName, UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName,
FullFilePath = trialDocumentNeedConfirmedUserType.TrialDocument.Path + "?access_token=" + _userInfo.UserToken FullFilePath = trialDocumentNeedConfirmedUserType.TrialDocument.Path
}; };
@ -325,7 +325,7 @@ namespace IRaCIS.Core.Application.Services
UserName = trialUser.User.UserName, UserName = trialUser.User.UserName,
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName, UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName,
FullFilePath = needConfirmEdUserType.SystemDocument.Path + "?access_token=" + _userInfo.UserToken FullFilePath = needConfirmEdUserType.SystemDocument.Path
}; };
var unionQuery = trialDocQuery.Union(systemDocQuery) var unionQuery = trialDocQuery.Union(systemDocQuery)
@ -626,7 +626,7 @@ namespace IRaCIS.Core.Application.Services
Id = t.Id, Id = t.Id,
IsSystemDoc = true, IsSystemDoc = true,
CreateTime = t.CreateTime, CreateTime = t.CreateTime,
FullFilePath = t.Path + "?access_token=" + _userInfo.UserToken, FullFilePath = t.Path ,
IsDeleted = t.IsDeleted, IsDeleted = t.IsDeleted,
Name = t.Name, Name = t.Name,
Path = t.Path, Path = t.Path,
@ -644,7 +644,7 @@ namespace IRaCIS.Core.Application.Services
Id = t.Id, Id = t.Id,
IsSystemDoc = false, IsSystemDoc = false,
CreateTime = t.CreateTime, CreateTime = t.CreateTime,
FullFilePath = t.Path + "?access_token=" + _userInfo.UserToken, FullFilePath = t.Path ,
IsDeleted = t.IsDeleted, IsDeleted = t.IsDeleted,
Name = t.Name, Name = t.Name,
Path = t.Path, Path = t.Path,

View File

@ -15,21 +15,21 @@ namespace IRaCIS.Core.Application.Service
var token = string.Empty; var token = string.Empty;
CreateMap<SystemDocument, SystemDocumentView>() CreateMap<SystemDocument, SystemDocumentView>()
.ForMember(d => d.FileType, u => u.MapFrom(s => s.FileType.Value)) .ForMember(d => d.FileType, u => u.MapFrom(s => s.FileType.Value))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path));
CreateMap<TrialDocument, TrialDocumentView>() CreateMap<TrialDocument, TrialDocumentView>()
.ForMember(d => d.FileType, u => u.MapFrom(s => s.FileType.Value)) .ForMember(d => d.FileType, u => u.MapFrom(s => s.FileType.Value))
.ForMember(d => d.IsSomeUserSigned, u => u.MapFrom(s => s.TrialDocConfirmedUserList.Any())) .ForMember(d => d.IsSomeUserSigned, u => u.MapFrom(s => s.TrialDocConfirmedUserList.Any()))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path ));
CreateMap<SystemDocument, UnionDocumentView>() CreateMap<SystemDocument, UnionDocumentView>()
.ForMember(d => d.IsSystemDoc, u => u.MapFrom(s => true)) .ForMember(d => d.IsSystemDoc, u => u.MapFrom(s => true))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path ));
CreateMap<TrialDocument, UnionDocumentView>() CreateMap<TrialDocument, UnionDocumentView>()
.ForMember(d => d.IsSystemDoc, u => u.MapFrom(s => false)) .ForMember(d => d.IsSystemDoc, u => u.MapFrom(s => false))
.ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path ));
CreateMap<TrialDocNeedConfirmedUserType, NeedConfirmedUserTypeView>().ForMember(d => d.UserTypeShortName, t => t.MapFrom(c => c.UserTypeRole.UserTypeShortName)); CreateMap<TrialDocNeedConfirmedUserType, NeedConfirmedUserTypeView>().ForMember(d => d.UserTypeShortName, t => t.MapFrom(c => c.UserTypeRole.UserTypeShortName));
CreateMap<SystemDocNeedConfirmedUserType, NeedConfirmedUserTypeView>().ForMember(d => d.UserTypeShortName, t => t.MapFrom(c => c.UserTypeRole.UserTypeShortName)); CreateMap<SystemDocNeedConfirmedUserType, NeedConfirmedUserTypeView>().ForMember(d => d.UserTypeShortName, t => t.MapFrom(c => c.UserTypeRole.UserTypeShortName));

View File

@ -1,9 +1,5 @@
using IRaCIS.Application.Interfaces; using Microsoft.AspNetCore.Mvc;
using IRaCIS.Application.Contracts; using Microsoft.Extensions.Caching.Distributed;
using IRaCIS.Core.Infra.EFCore;
using Microsoft.AspNetCore.Mvc;
using System.Globalization;
using System.ComponentModel.DataAnnotations;
namespace IRaCIS.Application.Services namespace IRaCIS.Application.Services
{ {
@ -13,10 +9,13 @@ namespace IRaCIS.Application.Services
private readonly IRepository<Dictionary> _dicRepository; private readonly IRepository<Dictionary> _dicRepository;
private readonly IRepository<Trial> _trialRepository; private readonly IRepository<Trial> _trialRepository;
public TestService(IRepository<Dictionary> dicRepository, IRepository<Trial> trialRepository) private readonly IDistributedCache _cache;
public TestService(IRepository<Dictionary> dicRepository, IRepository<Trial> trialRepository, IDistributedCache cache)
{ {
_dicRepository = dicRepository; _dicRepository = dicRepository;
_trialRepository = trialRepository; _trialRepository = trialRepository;
_cache = cache;
} }
public string Get() public string Get()
@ -28,7 +27,9 @@ namespace IRaCIS.Application.Services
public string Get(testModel testModel) public string Get(testModel testModel)
{ {
var aa= _trialRepository.Where(t => t.Id == Guid.Empty).First(); //_cache.SetString("test" , "cacheStr");
//var aa= _trialRepository.Where(t => t.Id == Guid.Empty).First();
//var aaabb = _trialRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result; //var aaabb = _trialRepository.BatchDeleteNoTrackingAsync(t => t.Id == Guid.Empty).Result;