You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BookingHeChuan/Myshipping.Core/Service/Cache/ISysCacheService.cs

246 lines
6.3 KiB
C#

using Myshipping.Core.Entity;
2 years ago
using Myshipping.Core.Service.Dict.Dto;
using System;
2 years ago
using System.Collections.Generic;
2 years ago
using System.Threading.Tasks;
namespace Myshipping.Core.Service;
2 years ago
public interface ISysCacheService
{
bool Del(string key);
Task<bool> DelAsync(string key);
Task<bool> DelByPatternAsync(string key);
List<string> GetAllCacheKeys();
Task<List<long>> GetDataScope(long userId);
Task<List<long>> GetUsersDataScope(long userId);
Task<List<AntDesignTreeNode>> GetMenu(long userId, string appCode);
Task<List<string>> GetPermission(long userId);
Task SetDataScope(long userId, List<long> dataScopes);
Task SetUsersDataScope(long userId, List<long> dataScopes);
Task SetMenu(long userId, string appCode, List<AntDesignTreeNode> menus);
Task SetPermission(long userId, List<string> permissions);
bool Set(string key, object value);
Task<bool> SetAsync(string key, object value);
2 years ago
Task<bool> SetTimeoutAsync(string key, object value, TimeSpan ts);
2 years ago
string Get(string key);
Task<string> GetAsync(string key);
T Get<T>(string key);
Task<T> GetAsync<T>(string key);
bool Exists(string key);
Task<bool> ExistsAsync(string key);
Task<List<string>> GetAllPermission();
Task SetAllPermission(List<string> permissions);
#region 公共库缓存
/// <summary>
/// 获取公共库 船公司
/// </summary>
/// <returns></returns>
Task<List<CodeCarrier>> GetAllCodeCarrier();
2 years ago
/// <summary>
/// 获取公共库 船名
/// </summary>
/// <returns></returns>
Task<List<CodeVessel>> GetAllCodeVessel();
/// <summary>
/// 获取公共库 船代
/// </summary>
/// <returns></returns>
Task<List<CodeForwarder>> GetAllCodeForwarder();
/// <summary>
/// 获取公共库 场站
/// </summary>
/// <returns></returns>
Task<List<CodeYard>> GetAllCodeYard();
/// <summary>
/// 获取公共库 起始港
/// </summary>
/// <returns></returns>
Task<List<CodePortLoad>> GetAllCodePortLoad();
/// <summary>
/// 获取公共库 目的港
/// </summary>
/// <returns></returns>
Task<List<CodePort>> GetAllCodePort();
/// <summary>
/// 获取公共库 包装
/// </summary>
/// <returns></returns>
Task<List<CodePackage>> GetAllCodePackage();
/// <summary>
/// 获取公共库 运输方式
/// </summary>
/// <returns></returns>
Task<List<CodeService>> GetAllCodeService();
/// <summary>
/// 获取公共库 箱型
/// </summary>
/// <returns></returns>
Task<List<CodeCtn>> GetAllCodeCtn();
/// <summary>
/// 获取公共库 付费方式
/// </summary>
/// <returns></returns>
Task<List<CodeFrt>> GetAllCodeFrt();
/// <summary>
/// 获取公共库 箱型映射
/// </summary>
/// <returns></returns>
Task<List<MappingCtn>> GetAllMappingCtn();
/// <summary>
/// 获取公共库 船司映射
/// </summary>
/// <returns></returns>
Task<List<MappingCarrier>> GetAllMappingCarrier();
/// <summary>
/// 获取公共库 付费方式映射
/// </summary>
/// <returns></returns>
Task<List<MappingFrt>> GetAllMappingFrt();
/// <summary>
/// 获取公共库 船名映射
/// </summary>
/// <returns></returns>
Task<List<MappingVessel>> GetAllMappingVessel();
/// <summary>
/// 设置公共库 船公司
/// </summary>
/// <returns></returns>
Task SetAllCodeCarrier(List<CodeCarrier> list);
/// <summary>
/// 设置公共库 船名
/// </summary>
/// <returns></returns>
Task SetAllCodeVessel(List<CodeVessel> list);
/// <summary>
/// 设置公共库 船代
/// </summary>
/// <returns></returns>
Task SetAllCodeForwarder(List<CodeForwarder> list);
/// <summary>
/// 设置公共库 场站
/// </summary>
/// <returns></returns>
Task SetAllCodeYard(List<CodeYard> list);
/// <summary>
/// 设置公共库 起始港
/// </summary>
/// <returns></returns>
Task SetAllCodePortLoad(List<CodePortLoad> list);
/// <summary>
/// 设置公共库 目的港
/// </summary>
/// <returns></returns>
Task SetAllCodePort(List<CodePort> list);
/// <summary>
/// 设置公共库 包装
/// </summary>
/// <returns></returns>
Task SetAllCodePackage(List<CodePackage> list);
/// <summary>
/// 设置公共库 运输方式
/// </summary>
/// <returns></returns>
Task SetAllCodeService(List<CodeService> list);
/// <summary>
/// 设置公共库 箱型
/// </summary>
/// <returns></returns>
Task SetAllCodeCtn(List<CodeCtn> list);
/// <summary>
/// 设置公共库 付费方式
/// </summary>
/// <returns></returns>
Task SetAllCodeFrt(List<CodeFrt> list);
/// <summary>
/// 设置公共库 箱型映射
/// </summary>
/// <returns></returns>
Task SetAllMappingCtn(List<MappingCtn> list);
/// <summary>
/// 设置公共库 船司映射
/// </summary>
/// <returns></returns>
Task SetAllMappingCarrier(List<MappingCarrier> list);
/// <summary>
/// 设置公共库 费用方式映射
/// </summary>
/// <returns></returns>
Task SetAllMappingFrt(List<MappingFrt> list);
/// <summary>
/// 设置公共库 船名映射
/// </summary>
/// <returns></returns>
Task SetAllMappingVessel(List<MappingVessel> list);
#endregion
#region DJY
/// <summary>
/// 获取租户参数
/// </summary>
/// <returns></returns>
Task<List<DjyTenantParamValue>> GetAllTenantParam();
/// <summary>
/// 设置租户参数
/// </summary>
/// <returns></returns>
Task SetAllTenantParam(List<DjyTenantParamValue> list);
2 years ago
/// <summary>
/// 获取字典
/// </summary>
/// <returns></returns>
Task<List<DictDataDto>> GetAllDictData();
/// <summary>
/// 设置字典
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
Task SetAllDictData(List<DictDataDto> list);
2 years ago
/// <summary>
/// 获取EDI参数
/// </summary>
/// <returns></returns>
Task<List<DjyEdiSetting>> GetAllEdiSetting();
/// <summary>
/// 设置EDI参数
/// </summary>
/// <returns></returns>
Task SetAllEdiSetting(List<DjyEdiSetting> list);
#endregion
2 years ago
}