1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- package com.ruoyi.demo.entity;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableName;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
- import com.fasterxml.jackson.databind.annotation.JsonSerialize;
- import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
- import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
- import com.ruoyi.demo.entity.bo.OrderAddBo;
- import lombok.Data;
- import java.time.LocalDateTime;
- @Data
- @TableName("dl_order")
- public class Order {
- @TableField("order_id")
- private String orderId;
- @TableField("vendor_id")
- private String vendorId;
- @TableField("vendor_name")
- private String vendorName;
- @TableField("goods_id")
- private String goodsId;
- @TableField("goods_name")
- private String goodsName;
- @TableField("specs")
- private String specs;
- @TableField("goods_price")
- private Float goodsPrice;
- @TableField("total_price")
- private Float totalPrice;
- @TableField("state")
- private String state;
- @TableField("user_id")
- private String userId;
- @TableField("user_name")
- private String userName;
- @TableField("user_telephone")
- private String userTelephone;
- @TableField("commercial_id")
- private String commercialId;
- @TableField("commercial_name")
- private String commercialName;
- @TableField("appkey")
- private String appkey;
- @TableField("app_name")
- private String appName;
- @TableField("create_time")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- @JsonSerialize(using = LocalDateTimeSerializer.class)
- @JsonDeserialize(using = LocalDateTimeDeserializer.class)
- private LocalDateTime createTime;
- @TableField("deleted")
- private int deleted;
- public Order (OrderAddBo bo){
- this.orderId = bo.getOrderId();
- this.vendorId = bo.getVendorId();
- this.vendorName = bo.getVendorName();
- this.goodsId = bo.getGoodsId();
- this.goodsName = bo.getGoodsName();
- this.goodsPrice = bo.getGoodsPrice();
- this.specs = bo.getSpecs();
- this.totalPrice = bo.getTotalPrice();
- this.state = bo.getState();
- this.userId = bo.getUserId();
- this.userName = bo.getUserName();
- this.userTelephone = bo.getUserTelephone();
- this.commercialId = bo.getCommercialId();
- this.commercialName = bo.getCommercialName();
- this.appkey = bo.getAppkey();
- this.appName = bo.getAppName();
- this.createTime = bo.getCreateTime();
- }
- }
|