From 8abe275e36823f1065300af45e1f7a9a68f549a7 Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期三, 06 九月 2023 16:14:40 +0800 Subject: [PATCH] 修改bug --- standard-server/src/main/java/com/yuanchu/limslaboratory/pojo/Product.java | 67 ++++++++++++++++++++++++--------- 1 files changed, 49 insertions(+), 18 deletions(-) diff --git a/standard-server/src/main/java/com/yuanchu/limslaboratory/pojo/Product.java b/standard-server/src/main/java/com/yuanchu/limslaboratory/pojo/Product.java index 19479c6..720a24d 100644 --- a/standard-server/src/main/java/com/yuanchu/limslaboratory/pojo/Product.java +++ b/standard-server/src/main/java/com/yuanchu/limslaboratory/pojo/Product.java @@ -1,9 +1,12 @@ package com.yuanchu.limslaboratory.pojo; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.*; + import java.time.LocalDateTime; import java.io.Serializable; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -11,7 +14,7 @@ /** * <p> - * + * * </p> * * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃 @@ -24,41 +27,69 @@ private static final long serialVersionUID = 1L; - @ApiModelProperty(value = "椤圭洰id") + @ApiModelProperty(value = "椤圭洰id", hidden = true) @TableId(value = "id", type = IdType.AUTO) private Integer id; - @ApiModelProperty(value = "椤圭洰鍚嶇О") + @ApiModelProperty(value = "椤圭洰鍚嶇О", example = "閾濆寘閽㈣姱閾濈粸绾�", required = true) private String name; - @ApiModelProperty(value = "璇曢獙鏂规硶") - private String method; - - @ApiModelProperty(value = "椤圭洰鐖剁被") + @ApiModelProperty(value = "椤圭洰鐖剁被", example = "鍗曚綅闀垮害璐ㄩ噺") private String father; - @ApiModelProperty(value = "鍗曚綅") + @ApiModelProperty(value = "鍗曚綅", example = "km") private String unit; - @ApiModelProperty(value = "鎷涙爣浜鸿姹傚��") + @ApiModelProperty(value = "鏍囧噯鍊�", example = "<=0.3458") private String required; - @ApiModelProperty(value = "鍐呮帶鍊�") + @ApiModelProperty(value = "鍐呮帶鍊�", example = "<=0.3458") private String internal; + + @ApiModelProperty(value = "閫昏緫鍒犻櫎 姝e父>=1,鍒犻櫎<=0", hidden = true) private Integer state; - private LocalDateTime createTime; + @TableField(fill = FieldFill.INSERT) + @ApiModelProperty(value = "鍒涘缓鏃堕棿", hidden = true) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; - private LocalDateTime updateTime; + @TableField(fill = FieldFill.INSERT_UPDATE) + @ApiModelProperty(value = "鏇存柊鏃堕棿", hidden = true) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + @ApiModelProperty(value = "鐗堟湰", hidden = true) private Integer version; - @ApiModelProperty(value = "鍏宠仈 鐢ㄦ埛id") - private Integer userId; + @ApiModelProperty(value = "鍏宠仈 鍨嬪彿id", example = "1", hidden = true) + private Integer specifications_id; - @ApiModelProperty(value = "鍏宠仈 鐗╂枡id") - private String materialId; + public Product() { + } + public Product(Integer id, String name, String father, String unit, String required, String internal, Integer state, Date createTime, Date updateTime, Integer version, Integer specifications_id) { + this.id = id; + this.name = name; + this.father = father; + this.unit = unit; + this.required = required; + this.internal = internal; + this.state = state; + this.createTime = createTime; + this.updateTime = updateTime; + this.version = version; + this.specifications_id = specifications_id; + } + public Product(String name, String father, String unit, Date createTime, Date updateTime, Integer version, Integer specifications_id) { + this.name = name; + this.father = father; + this.unit = unit; + this.createTime = createTime; + this.updateTime = updateTime; + this.version = version; + this.specifications_id = specifications_id; + } } -- Gitblit v1.9.3