booking_auth_dev
wet 2 years ago
parent 8215685b89
commit fc72c183cf

@ -4631,6 +4631,12 @@
获取货运动态
</summary>
</member>
<member name="M:Myshipping.Application.BookingOrderService.Download(System.Int64)">
<summary>
下载文件
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Application.BookingOrderService.SendTrace(System.String,System.String,System.String,System.String)">
<summary>
调用运踪接口

@ -593,6 +593,23 @@ namespace Myshipping.Application
return dto;
}
/// <summary>
/// 下载文件
/// </summary>
/// <returns></returns>
[HttpGet("/BookingOrder/download")]
public async Task<IActionResult> Download(long id)
{
var file = await _bookingfile.FirstOrDefaultAsync(x => x.Id == id);
var filePath = Path.Combine(App.WebHostEnvironment.WebRootPath, file.FilePath);
var fileName = HttpUtility.UrlEncode(file.FileName, Encoding.GetEncoding("UTF-8"));
var result = new FileStreamResult(new FileStream(filePath, FileMode.Open), "application/octet-stream") { FileDownloadName = fileName };
return result;
}
#endregion
#region 运踪

@ -18,7 +18,7 @@ namespace Myshipping.Application
Task<dynamic> Page([FromQuery] BookingOrderInput input);
Task<List<BookingLogDto>> GetLog(long Id);
Task<IActionResult> Download(long id);
Task<List<BookingRemark>> GetRemark(long Id);
Task AddRemark(BookingRemarkDto dto);

@ -87,7 +87,7 @@ namespace Myshipping.Core.Job
await App.GetService<IDjyTenantParamService>().CacheData();
//系统参数
await App.GetService<ISysConfigService>().GetAllSysConfig();
await App.GetService<ISysConfigService>().CacheData();
Log.Information($"缓存公共库完成 {DateTime.Now}");
}

@ -5906,6 +5906,19 @@
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.ISysCacheService.GetAllSysConfig">
<summary>
获取系统缓存
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.ISysCacheService.SetAllSysConfig(System.Collections.Generic.List{Myshipping.Core.Entity.SysConfig})">
<summary>
设置系统缓存
</summary>
<param name="list"></param>
<returns></returns>
</member>
<member name="T:Myshipping.Core.Service.SysCacheService">
<summary>
系统缓存服务
@ -6358,6 +6371,18 @@
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.SysCacheService.SetAllSysConfig(System.Collections.Generic.List{Myshipping.Core.Entity.SysConfig})">
<summary>
更新配置缓存
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.SysCacheService.GetAllSysConfig">
<summary>
获取配置缓存
</summary>
<returns></returns>
</member>
<member name="T:Myshipping.Core.Service.CodeGenConfigService">
<summary>
代码生成详细配置服务
@ -7917,12 +7942,6 @@
<param name="code"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.SysConfigService.GetAllSysConfig">
<summary>
更新配置缓存
</summary>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.SysConfigService.GetDemoEnvFlag">
<summary>
获取演示环境开关是否开启默认为false

@ -310,9 +310,16 @@ public interface ISysCacheService
/// </summary>
/// <returns></returns>
Task SetAllEdiSetting(List<DjyEdiSetting> list);
/// <summary>
/// 获取系统缓存
/// </summary>
/// <returns></returns>
Task<List<SysConfig>> GetAllSysConfig();
/// <summary>
/// 设置系统缓存
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
Task SetAllSysConfig(List<SysConfig> list);
#endregion

@ -17,6 +17,6 @@ public interface ISysConfigService
Task<bool> GetCaptchaOpenFlag();
Task<string> GetDefaultPassword();
Task CacheData();
}

@ -122,6 +122,21 @@ public class SysConfigService : ISysConfigService, IDynamicApiController, ITrans
}
}
public async Task CacheData()
{
if (!_sysCacheService.Exists("CommonConst.DJY_CONST"))
{
var list = await _sysConfigRep.AsQueryable().Where(u => u.GroupCode == CommonConst.DJY_CONST).ToListAsync();
await _sysCacheService.SetAllSysConfig(list);
}
}
/// <summary>
/// 获取系统参数配置
/// </summary>

@ -8,7 +8,7 @@
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile />
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>

Loading…
Cancel
Save