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.

391 lines
10 KiB
C#

using Myshipping.Core.Entity;
using Myshipping.Core.Entity.CommonDB;
using Myshipping.Core.Service.Dict.Dto;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Myshipping.Core.Service;
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);
Task<bool> SetTimeoutAsync(string key, object value, TimeSpan ts);
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();
/// <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<CodeLane>> GetAllCodeLane();
/// <summary>
/// 设置公共库 航线与港口的的关系表
/// </summary>
/// <returns></returns>
Task<List<RelaPortCarrierLane>> GetAllRelaPortCarrierLane();
/// <summary>
/// 获取公共库 国家
/// </summary>
/// <returns></returns>
Task<List<CodeCountry>> GetAllCodeCountry();
/// <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<List<MappingYard>> GetAllMappingYard();
/// <summary>
/// 获取公共库 船代映射
/// </summary>
/// <returns></returns>
Task<List<MappingForwarder>> GetAllMappingForwarder();
/// <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);
/// <summary>
/// 设置公共库 场站映射
/// </summary>
/// <returns></returns>
Task SetAllMappingYard(List<MappingYard> list);
/// <summary>
/// 设置公共库 船代映射
/// </summary>
/// <returns></returns>
Task SetAllMappingForwarder(List<MappingForwarder> list);
/// <summary>
/// 设置公共库 起始港映射
/// </summary>
/// <returns></returns>
Task SetAllMappingPortLoad(List<MappingPortLoad> list);
/// <summary>
/// 获取公共库 起始港映射
/// </summary>
/// <returns></returns>
Task<List<MappingPortLoad>> GetAllMappingPortLoad();
/// <summary>
/// 获取公共库 目的港映射
/// </summary>
/// <returns></returns>
Task<List<MappingPort>> GetAllMappingPort();
/// <summary>
/// 设置公共库 目的港映射
/// </summary>
/// <returns></returns>
Task SetAllMappingPort(List<MappingPort> list);
/// <summary>
/// 设置公共库 包装映射
/// </summary>
/// <returns></returns>
Task SetAllMappingPackage(List<MappingPackage> list);
/// <summary>
/// 获取公共库 包装映射
/// </summary>
/// <returns></returns>
Task<List<MappingPackage>> GetAllMappingPackage();
/// <summary>
/// 获取公共库 运输条款映射
/// </summary>
/// <returns></returns>
Task<List<MappingService>> GetAllMappingService();
/// <summary>
/// 设置公共库 运输条款映射
/// </summary>
/// <returns></returns>
Task SetAllMappingService(List<MappingService> list);
/// <summary>
/// 获取公共库 签单方式
/// </summary>
/// <returns></returns>
Task<List<CodeIssueType>> GetAllCodeIssueType();
/// <summary>
/// 获取公共库 签单方式映射
/// </summary>
/// <returns></returns>
Task<List<MappingIssueType>> GetAllMappingIssueType();
/// <summary>
/// 设置公共库 签单方式
/// </summary>
/// <returns></returns>
Task SetAllCodeIssueType(List<CodeIssueType> list);
/// <summary>
/// 设置公共库 签单方式映射
/// </summary>
/// <returns></returns>
Task SetAllMappingIssueType(List<MappingIssueType> list);
/// <summary>
/// 设置公共库 航线
/// </summary>
/// <returns></returns>
Task SetAllCodeLane(List<CodeLane> list);
/// <summary>
/// 设置公共库 航线与港口的的关系表
/// </summary>
/// <returns></returns>
Task SetAllRelaPortCarrierLane(List<RelaPortCarrierLane> list);
/// <summary>
/// 设置公共库 国家
/// </summary>
/// <returns></returns>
Task SetAllCodeCountry(List<CodeCountry> list);
#endregion
#region DJY
/// <summary>
/// 获取租户参数
/// </summary>
/// <returns></returns>
Task<List<DjyTenantParamValue>> GetAllTenantParam();
/// <summary>
/// 设置租户参数
/// </summary>
/// <returns></returns>
Task SetAllTenantParam(List<DjyTenantParamValue> list);
/// <summary>
/// 获取字典
/// </summary>
/// <returns></returns>
Task<List<DictDataDto>> GetAllDictData();
/// <summary>
/// 设置字典
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
Task SetAllDictData(List<DictDataDto> list);
/// <summary>
/// 获取EDI参数
/// </summary>
/// <returns></returns>
Task<List<DjyEdiSetting>> GetAllEdiSetting();
/// <summary>
/// 设置EDI参数
/// </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
}