package zy.cloud.wms.manager.entity; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; import com.core.common.Cools; import com.core.common.SpringUtils; import io.swagger.annotations.ApiModelProperty; import zy.cloud.wms.system.entity.User; import zy.cloud.wms.system.service.UserService; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Date; @TableName("man_order_settle") public class OrderSettle implements Serializable { private static final long serialVersionUID = 1L; /** * 订单状态 */ @ApiModelProperty(value= "订单状态") @TableId(value = "order_settle", type = IdType.INPUT) @TableField("order_settle") private Long orderSettle; /** * 状态描述 */ @ApiModelProperty(value= "状态描述") @TableField("settle_name") private String settleName; /** * 添加人员 */ @ApiModelProperty(value= "添加人员") @TableField("create_by") private Long createBy; /** * 添加时间 */ @ApiModelProperty(value= "添加时间") @TableField("create_time") private Date createTime; /** * 修改人员 */ @ApiModelProperty(value= "修改人员") @TableField("update_by") private Long updateBy; /** * 修改时间 */ @ApiModelProperty(value= "修改时间") @TableField("update_time") private Date updateTime; /** * 备注 */ @ApiModelProperty(value= "备注") private String memo; public OrderSettle() {} public OrderSettle(Long orderSettle,String settleName,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { this.settleName = settleName; this.createBy = createBy; this.createTime = createTime; this.updateBy = updateBy; this.updateTime = updateTime; this.memo = memo; } // OrderSettle orderSettle = new OrderSettle( // null, // 订单状态[非空] // null, // 状态描述 // null, // 添加人员 // null, // 添加时间 // null, // 修改人员 // null, // 修改时间 // null // 备注 // ); public Long getOrderSettle() { return orderSettle; } public void setOrderSettle(Long orderSettle) { this.orderSettle = orderSettle; } public String getSettleName() { return settleName; } public void setSettleName(String settleName) { this.settleName = settleName; } public Long getCreateBy() { return createBy; } public String getCreateBy$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.createBy); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public void setCreateBy(Long createBy) { this.createBy = createBy; } public Date getCreateTime() { return createTime; } public String getCreateTime$(){ if (Cools.isEmpty(this.createTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Long getUpdateBy() { return updateBy; } public String getUpdateBy$(){ UserService service = SpringUtils.getBean(UserService.class); User user = service.selectById(this.updateBy); if (!Cools.isEmpty(user)){ return String.valueOf(user.getNickname()); } return null; } public void setUpdateBy(Long updateBy) { this.updateBy = updateBy; } public Date getUpdateTime() { return updateTime; } public String getUpdateTime$(){ if (Cools.isEmpty(this.updateTime)){ return ""; } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } }