merge from 2023-03-14
This commit is contained in:
@@ -6,6 +6,7 @@ using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Helper;
|
||||
using JNPF.Common.Manager;
|
||||
using JNPF.Common.Models.NPOI;
|
||||
using JNPF.Common.Models.User;
|
||||
using JNPF.Common.Security;
|
||||
@@ -69,6 +70,11 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
|
||||
/// </summary>
|
||||
private readonly IFileManager _fileManager;
|
||||
|
||||
/// <summary>
|
||||
/// 缓存管理.
|
||||
/// </summary>
|
||||
private readonly ICacheManager _cacheManager;
|
||||
|
||||
/// <summary>
|
||||
/// 用户管理.
|
||||
/// </summary>
|
||||
@@ -83,6 +89,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
|
||||
IUserRelationService userRelationService,
|
||||
ISysConfigService sysConfigService,
|
||||
ISynThirdInfoService synThirdInfoService,
|
||||
ICacheManager cacheManager,
|
||||
IFileManager fileService,
|
||||
IUserManager userManager)
|
||||
{
|
||||
@@ -91,6 +98,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
|
||||
_userRelationService = userRelationService;
|
||||
_sysConfigService = sysConfigService;
|
||||
_userManager = userManager;
|
||||
_cacheManager = cacheManager;
|
||||
_synThirdInfoService = synThirdInfoService;
|
||||
_fileManager = fileService;
|
||||
}
|
||||
@@ -1522,6 +1530,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
|
||||
fs.Close();
|
||||
}
|
||||
|
||||
_cacheManager.Set(excelconfig.FileName, string.Empty);
|
||||
return new { name = excelconfig.FileName, url = "/api/file/Download?encryption=" + DESCEncryption.Encrypt(_userManager.UserId + "|" + excelconfig.FileName + "|" + addPath, "JNPF") };
|
||||
}
|
||||
|
||||
@@ -1551,6 +1560,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
|
||||
string? addPath = Path.Combine(FileVariable.TemporaryFilePath, excelconfig.FileName);
|
||||
ExcelExportHelper<UserListImportDataInput>.Export(dataList, excelconfig, addPath);
|
||||
|
||||
_cacheManager.Set(excelconfig.FileName, string.Empty);
|
||||
return new { name = excelconfig.FileName, url = "/api/file/Download?encryption=" + DESCEncryption.Encrypt(_userManager.UserId + "|" + excelconfig.FileName + "|" + addPath, "JNPF") };
|
||||
}
|
||||
|
||||
@@ -1631,6 +1641,7 @@ public class UsersService : IUsersService, IDynamicApiController, ITransient
|
||||
string? addPath = Path.Combine(FileVariable.TemporaryFilePath, excelconfig.FileName);
|
||||
ExcelExportHelper<UserListImportDataInput>.Export(errorlist, excelconfig, addPath);
|
||||
|
||||
_cacheManager.Set(excelconfig.FileName, string.Empty);
|
||||
return new { name = excelconfig.FileName, url = "/api/file/Download?encryption=" + DESCEncryption.Encrypt(_userManager.UserId + "|" + excelconfig.FileName + "|" + addPath, "JNPF") };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user