fix(ops): 修复工单业务日志id生成问题
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.viewsh.module.ops.dal.dataobject.log;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
@@ -20,7 +20,6 @@ import java.util.Map;
|
||||
* @author lzh
|
||||
*/
|
||||
@TableName(value = "ops_business_event_log", autoResultMap = true)
|
||||
@KeySequence("ops_business_event_log_seq")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@@ -32,9 +31,9 @@ public class OpsBusinessEventLogDO extends BaseDO {
|
||||
// ==================== 主键 ====================
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
* 主键ID(使用雪花算法生成)
|
||||
*/
|
||||
@TableId
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
// ==================== 时间与级别 ====================
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.viewsh.module.ops.infrastructure.log.recorder;
|
||||
|
||||
import com.viewsh.module.ops.dal.dataobject.log.OpsBusinessEventLogDO;
|
||||
import com.viewsh.module.ops.infrastructure.id.OrderIdGenerator;
|
||||
import com.viewsh.module.ops.infrastructure.log.enumeration.EventDomain;
|
||||
import com.viewsh.module.ops.infrastructure.log.enumeration.EventLevel;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -31,6 +32,9 @@ public class EventLogRecorderImpl implements EventLogRecorder {
|
||||
@Resource
|
||||
private EventLogPersister persister;
|
||||
|
||||
@Resource
|
||||
private OrderIdGenerator orderIdGenerator;
|
||||
|
||||
/**
|
||||
* 异步记录日志(默认方式)
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user