JAVA映射实体类对象和LIst

JAVA映射实体类对象和LIst

  • JAVA映射实体类对象
java 复制代码
@Data
@TableName("res_tcm_scada")
public class ResTcmScadaEntity {
    /**
     * id
     */
    @TableId("ID")
    private String id;

    /**
     * 工艺id
     */
    @TableField("item_id")
    private String itemId;

    /**
     * 版本
     */
    @TableField("rev_id")
    private String revId;

    /**
     * 工艺方法
     */
    @TableField("process_type")
    private String processType;

    /**
     * 工艺名称
     */
    @TableField("jm_object_name")
    private String jmObjectName;

    /**
     * 零件代号
     */
    @TableField("jm_part_code")
    private String jmPartCode;

    /**
     * 零件名称
     */
    @TableField("jm_part_name")
    private String jmPartName;

    /**
     * 产品代号
     */
    @TableField("jm_product_code")
    private String jmProductCode;

    /**
     * 产品代号
     */
    @TableField("deleted")
    private int deleted;

    /**
     * 产品代号
     */
    @TableField("ext1")
    private String ext1;

    /**
     * 产品代号
     */
    @TableField("ext2")
    private String ext2;

    /**
     * 产品代号
     */
    @TableField("file_name")
    private String fileName;

    /**
     * 产品代号
     */
    @TableField("only_file_name")
    private String onlyFileName;

    /**
     * 产品代号
     */
    @TableField("file_path")
    private String filePath;

    /**
     * 产品代号
     */
    @TableField("compressed_path")
    private String compressedPath;

    /**
     * 批次号
     */
    @TableField("batch")
    private String batch;
}
java 复制代码
@Data
public class ResTcmScadaListVO {

    /**
     * 主键
     */
    @JsonProperty("id")
    private String id;

    /**
     * 工艺id
     */
    @JsonProperty("itemId")
    private String itemId;

    /**
     * 版本
     */
    @JsonProperty("revId")
    private String revId;

    /**
     * 工艺方法
     */
    @JsonProperty("processType")
    private String processType;

    /**
     * 工艺名称
     */
    @JsonProperty("jmObjectName")
    private String jmObjectName;

    /**
     * 零件代号
     */
    @JsonProperty("jmPartCode")
    private String jmPartCode;

    /**
     * 零件名称
     */
    @JsonProperty("jmPartName")
    private String jmPartName;

    /**
     * 产品代号
     */
    @JsonProperty("jmProductCode")
    private String jmProductCode;

    /**
     * 产品代号
     */
    @JsonProperty("file_name")
    private String fileName;

    /**
     * 产品代号
     */
    @JsonProperty("only_file_name")
    private String onlyFileName;

    /**
     * 产品代号
     */
    @JsonProperty("file_path")
    private String filePath;

    /**
     * 产品代号
     */
    @JsonProperty("compressed_path")
    private String compressedPath;

    /**
     * 批次号
     */
    @JsonProperty("batch")
    private String batch;

}

核心映射代码:单个对象

java 复制代码
        ResTcmScadaEntity resTcmScadaEntity = JsonUtil.getJsonToBean(resTcmScadaListVO, ResTcmScadaEntity.class);
  • JAVA映射实体类对象List
java 复制代码
        List<ResTcmScadaEntity> list = new ArratList();
        List<ResTcmScadaListVO> listVO = JsonUtil.getJsonToList(list, ResTcmScadaListVO.class);
相关推荐
吃茄子的猫8 小时前
python中global全局变量
python
Flash.kkl8 小时前
Python基础语法
开发语言·python
veminhe8 小时前
Python(二) 容器类型与对应操作行为
python
hdsoft_huge8 小时前
Java 实现高效查询海量 geometry 及 Protobuf 序列化与天地图前端分片加载
java·前端·状态模式
人工干智能8 小时前
调用client.beta.threads.runs.create后交由OpenAI云服务器端的处理
服务器·python·llm
xiaowu0808 小时前
IEnumerable、IEnumerator接口与yield return关键字的相关知识
java·开发语言·算法
笨手笨脚の8 小时前
深入理解 Java 虚拟机-01 JVM 内存模型
java·jvm··虚拟机栈·方法区
wyg_0311138 小时前
机器问道:大模型RAG 解读凡人修仙传
人工智能·python·transformer
未来之窗软件服务8 小时前
幽冥大陆(七十九)Python 水果识别训练视频识别 —东方仙盟练气期
开发语言·人工智能·python·水果识别·仙盟创梦ide·东方仙盟
weixin_462446239 小时前
用 python -m ensurepip --upgrade 修复 uv / venv 中缺失 pip 的问题
python·pip·uv