刘光辉
昨天 bb638871a7fb692d80f1b7a758f991dc0879002c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package jnpf.limsEntity;
 
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
 
import java.util.Date;
 
/**
 * LIMS 业务操作日志实体。
 * <p>
 * 表结构详见 {@code tasks/lims-biz-log-ddl.sql},设计详见 {@code tasks/biz-log-design.md}。
 * <p>
 * 不继承 {@code SuperEntity},因为日志表字段语义与 SuperEntity 默认审计字段不一致
 * (日志本身就是审计记录,无需 lastModify*;creatorUserId/creatorTime 我们重命名为 operatorUserId/creatorTime)。
 */
@Data
@TableName("lims_biz_log")
public class LimsBizLogEntity {
 
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
 
    /**
     * 自增序号,运维排查使用,业务代码不依赖。
     * <p>由 PG 列的 {@code GENERATED BY DEFAULT AS IDENTITY} 生成,不是 Java 侧填充——
     * {@code insertStrategy = FieldStrategy.NEVER} 让 insert 语句完全不提这一列,交给
     * identity 兜底。之前误标 {@code fill = FieldFill.INSERT}(照抄了平台 {@code f_} 前缀标准
     * 字段的写法,但没有任何 MetaObjectHandler 认识这个 LIMS 自建字段名),导致该列在 INSERT
     * 里被显式绑成 null——MySQL 的 AUTO_INCREMENT 遇显式 NULL 会自动生成,但 PG 的 IDENTITY
     * 只在语句完全不提该列时才生效,遇显式 NULL 直接拒绝,是 MySQL→PG 迁移遗留 bug(同 L043 一族)。
     */
    @TableField(value = "log_seq", insertStrategy = FieldStrategy.NEVER)
    private Long logSeq;
 
    @TableField("biz_code")
    private String bizCode;
 
    @TableField("biz_type")
    private String bizType;
 
    @TableField("source_model_id")
    private String sourceModelId;
 
    @TableField("source_data_id")
    private String sourceDataId;
 
    @TableField("action_type")
    private String actionType;
 
    @TableField("action_label")
    private String actionLabel;
 
    /** {@link jnpf.limsEntity.bizlog.VisualLogModel} 数组的 JSON 字符串 */
    @TableField("data_log")
    private String dataLog;
 
    /** 自由结构元数据 JSON */
    @TableField("extra_json")
    private String extraJson;
 
    @TableField("operator_user_id")
    private String operatorUserId;
 
    @TableField("operator_org_id")
    private String operatorOrgId;
 
    @TableField("creator_time")
    private Date creatorTime;
 
    @TableField("tenant_id")
    private String tenantId;
 
    @TableField("delete_mark")
    private Integer deleteMark;
}