优化日志模块:重构操作日志记录与查询功能,支持批量操作日志记录,完善日志查询接口,增加软删除操作类型
This commit is contained in:
@@ -4,12 +4,20 @@ package consts
|
||||
type OperationType string
|
||||
|
||||
const (
|
||||
OperationCreate OperationType = "create" // 创建
|
||||
OperationUpdate OperationType = "update" // 更新
|
||||
OperationDelete OperationType = "delete" // 删除
|
||||
OperationInsert OperationType = "insert" // 创建
|
||||
OperationUpdate OperationType = "update" // 更新
|
||||
OperationDelete OperationType = "delete" // 删除
|
||||
OperationDeleteSoft OperationType = "delete_soft" // 软删除
|
||||
)
|
||||
|
||||
// OperationLogCollection 操作日志集合名称常量
|
||||
const (
|
||||
OperationLogCollection = "operation_logs" // 操作日志集合名称
|
||||
)
|
||||
|
||||
// 消费者配置(从 Redis Stream 消费请求)
|
||||
const StreamKey = "log:%s" // 请求 Stream 键名(与发消息的key一致)
|
||||
const GroupName = "log:consumer:group" // 消费者组名
|
||||
const ConsumerName = "message-consumer-1" // 消费者名称(唯一标识)
|
||||
const BatchSize = 1 // 批处理大小(每次读取1条)
|
||||
const AutoAck = true // ACK是否自动确认(true自动确认,false不确认)
|
||||
|
||||
Reference in New Issue
Block a user