OrdersTime.java 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. package com.zhentao.pojo;
  2. import com.baomidou.mybatisplus.annotation.IdType;
  3. import com.baomidou.mybatisplus.annotation.TableField;
  4. import com.baomidou.mybatisplus.annotation.TableId;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import java.io.Serializable;
  7. import java.math.BigDecimal;
  8. import lombok.Data;
  9. /**
  10. *
  11. * @TableName orders_time
  12. */
  13. @TableName(value ="orders_time")
  14. @Data
  15. public class OrdersTime implements Serializable {
  16. /**
  17. * id
  18. */
  19. @TableId
  20. private Long id;
  21. /**
  22. * 商品id
  23. */
  24. private Long shopId;
  25. /**
  26. * 订单id
  27. */
  28. private Long ordersId;
  29. private BigDecimal jiage;
  30. /**
  31. * 数量
  32. */
  33. private Integer count;
  34. /**
  35. * 小计
  36. */
  37. private BigDecimal xiao;
  38. @TableField(exist = false)
  39. private static final long serialVersionUID = 1L;
  40. @Override
  41. public boolean equals(Object that) {
  42. if (this == that) {
  43. return true;
  44. }
  45. if (that == null) {
  46. return false;
  47. }
  48. if (getClass() != that.getClass()) {
  49. return false;
  50. }
  51. OrdersTime other = (OrdersTime) that;
  52. return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
  53. && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
  54. && (this.getOrdersId() == null ? other.getOrdersId() == null : this.getOrdersId().equals(other.getOrdersId()))
  55. && (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()))
  56. && (this.getJiage() == null ? other.getJiage() == null : this.getJiage().equals(other.getJiage()))
  57. && (this.getXiao() == null ? other.getXiao() == null : this.getXiao().equals(other.getXiao()));
  58. }
  59. @Override
  60. public int hashCode() {
  61. final int prime = 31;
  62. int result = 1;
  63. result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
  64. result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
  65. result = prime * result + ((getOrdersId() == null) ? 0 : getOrdersId().hashCode());
  66. result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
  67. result = prime * result + ((getXiao() == null) ? 0 : getXiao().hashCode());
  68. result = prime * result + ((getJiage() == null) ? 0 : getJiage().hashCode());
  69. return result;
  70. }
  71. @Override
  72. public String toString() {
  73. StringBuilder sb = new StringBuilder();
  74. sb.append(getClass().getSimpleName());
  75. sb.append(" [");
  76. sb.append("Hash = ").append(hashCode());
  77. sb.append(", id=").append(id);
  78. sb.append(", shopId=").append(shopId);
  79. sb.append(", ordersId=").append(ordersId);
  80. sb.append(", count=").append(count);
  81. sb.append(", jiage=").append(jiage);
  82. sb.append(", xiao=").append(xiao);
  83. sb.append(", serialVersionUID=").append(serialVersionUID);
  84. sb.append("]");
  85. return sb.toString();
  86. }
  87. }