完善系统参数配置和数据字典管理模块
This commit is contained in:
@@ -1,10 +1,44 @@
|
||||
using Model;
|
||||
using Model.Dto.System;
|
||||
using SqlSugar;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Service.Interface
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统参数配置 服务接口
|
||||
/// 管理侧:CRUD(按 Group 分组、关键字检索);业务侧:按 Key 单/批量取值(带缓存)
|
||||
/// 内置参数(IsSystem=1)禁止删除,仅允许修改 Value
|
||||
/// </summary>
|
||||
public interface ISystemParamService
|
||||
{
|
||||
// TODO: 定义 系统参数配置 相关方法
|
||||
// ==================== 管理侧 ====================
|
||||
|
||||
/// <summary>分页查询(关键字匹配 ParamKey/ParamName;可选 Group 过滤)</summary>
|
||||
Task<Result<List<SystemParamDto>>> GetListPagedAsync(int pageIndex, int pageSize, RefAsync<int> total, string? keyword = null, string? group = null);
|
||||
|
||||
/// <summary>参数详情</summary>
|
||||
Task<Result<SystemParamDto>> GetByIdAsync(long id);
|
||||
|
||||
/// <summary>新增参数(校验 ParamKey 唯一)</summary>
|
||||
Task<Result<SystemParamDto>> AddAsync(SystemParamDto dto);
|
||||
|
||||
/// <summary>修改参数(内置参数仅允许改 Value/Remark;非内置可改全字段;Key 变更时同步失效缓存)</summary>
|
||||
Task<Result<SystemParamDto>> UpdateAsync(SystemParamDto dto);
|
||||
|
||||
/// <summary>删除参数(内置参数禁止删除)</summary>
|
||||
Task<Result> DeleteAsync(long id);
|
||||
|
||||
/// <summary>清空参数值缓存(运维用)</summary>
|
||||
Task<Result> ReloadCacheAsync();
|
||||
|
||||
// ==================== 业务侧(无权限,供其它模块调用) ====================
|
||||
|
||||
/// <summary>按 Key 取单个值(带缓存;不存在返回空字符串)</summary>
|
||||
Task<Result<string>> GetValueAsync(string key);
|
||||
|
||||
/// <summary>按 Key 列表批量取值(带缓存)</summary>
|
||||
Task<Result<List<SystemParamValueDto>>> GetValuesAsync(string[] keys);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user