Files
QYZH.InteractiveMagazine/QYZH.InteractiveMagazine.IService/IOperationLogService.cs
glz 766be485d0 feat: 新增操作日志功能并优化定时任务配置
1.  新增OperationLogAttribute与OperationLogActionFilter,实现自动化操作日志记录
2.  新增OperationLogRecordInput输入模型,重构IOperationLogService日志接口
3.  为所有业务控制器接口添加操作日志注解
4.  调整期刊AI批改任务的执行周期与方法适配异步调用
5.  优化Hangfire定时任务注册逻辑,支持异步任务
6.  补充完善操作日志类型与目标类型枚举
2026-07-09 18:01:37 +08:00

44 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using QYZH.InteractiveMagazine.Models.Dto;
using QYZH.InteractiveMagazine.Models.Entity;
namespace QYZH.InteractiveMagazine.IService;
/// <summary>
/// 操作日志服务接口
/// </summary>
public interface IOperationLogService : IBaseService<OperationLog>
{
/// <summary>
/// 记录操作日志
/// </summary>
/// <param name="operatorId">操作人Id</param>
/// <param name="operatorName">操作人用户名</param>
/// <param name="actionType">操作类型(使用 OperationLogActionType 常量)</param>
/// <param name="targetType">目标类型(使用 OperationLogTargetType 常量)</param>
/// <param name="targetId">目标记录Id</param>
/// <param name="targetName">目标名称</param>
/// <param name="detail">操作详情可选JSON格式</param>
/// <param name="ipAddress">IP地址可选</param>
Task LogAsync(long operatorId, string operatorName, string actionType, string targetType, long targetId, string? targetName = null, string? detail = null, string? ipAddress = null);
/// <summary>
/// 记录操作日志
/// </summary>
/// <param name="input">操作日志记录输入</param>
Task LogAsync(OperationLogRecordInput input);
/// <summary>
/// 分页查询操作日志
/// </summary>
/// <param name="input">查询参数</param>
/// <returns>分页结果</returns>
Task<PageListModel<OperationLogOutput>> GetListAsync(OperationLogQueryInput input);
/// <summary>
/// 获取操作日志详情
/// </summary>
/// <param name="id">日志Id</param>
/// <returns>日志详情</returns>
Task<OperationLogDetailOutput> GetDetailAsync(long id);
}