Order.java 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package com.ruoyi.demo.entity;
  2. import com.baomidou.mybatisplus.annotation.TableField;
  3. import com.baomidou.mybatisplus.annotation.TableName;
  4. import com.fasterxml.jackson.annotation.JsonFormat;
  5. import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
  6. import com.fasterxml.jackson.databind.annotation.JsonSerialize;
  7. import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
  8. import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
  9. import com.ruoyi.demo.entity.bo.OrderAddBo;
  10. import lombok.Data;
  11. import java.time.LocalDateTime;
  12. @Data
  13. @TableName("dl_order")
  14. public class Order {
  15. @TableField("order_id")
  16. private String orderId;
  17. @TableField("vendor_id")
  18. private String vendorId;
  19. @TableField("vendor_name")
  20. private String vendorName;
  21. @TableField("goods_id")
  22. private String goodsId;
  23. @TableField("goods_name")
  24. private String goodsName;
  25. @TableField("specs")
  26. private String specs;
  27. @TableField("goods_price")
  28. private Float goodsPrice;
  29. @TableField("total_price")
  30. private Float totalPrice;
  31. @TableField("state")
  32. private String state;
  33. @TableField("user_id")
  34. private String userId;
  35. @TableField("user_name")
  36. private String userName;
  37. @TableField("user_telephone")
  38. private String userTelephone;
  39. @TableField("commercial_id")
  40. private String commercialId;
  41. @TableField("commercial_name")
  42. private String commercialName;
  43. @TableField("appkey")
  44. private String appkey;
  45. @TableField("app_name")
  46. private String appName;
  47. @TableField("create_time")
  48. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  49. @JsonSerialize(using = LocalDateTimeSerializer.class)
  50. @JsonDeserialize(using = LocalDateTimeDeserializer.class)
  51. private LocalDateTime createTime;
  52. @TableField("deleted")
  53. private int deleted;
  54. public Order (OrderAddBo bo){
  55. this.orderId = bo.getOrderId();
  56. this.vendorId = bo.getVendorId();
  57. this.vendorName = bo.getVendorName();
  58. this.goodsId = bo.getGoodsId();
  59. this.goodsName = bo.getGoodsName();
  60. this.goodsPrice = bo.getGoodsPrice();
  61. this.specs = bo.getSpecs();
  62. this.totalPrice = bo.getTotalPrice();
  63. this.state = bo.getState();
  64. this.userId = bo.getUserId();
  65. this.userName = bo.getUserName();
  66. this.userTelephone = bo.getUserTelephone();
  67. this.commercialId = bo.getCommercialId();
  68. this.commercialName = bo.getCommercialName();
  69. this.appkey = bo.getAppkey();
  70. this.appName = bo.getAppName();
  71. this.createTime = bo.getCreateTime();
  72. }
  73. }