1
This commit is contained in:
93
src/main/java/cn/van/business/model/GoodsInfoVO.java
Normal file
93
src/main/java/cn/van/business/model/GoodsInfoVO.java
Normal file
@@ -0,0 +1,93 @@
|
||||
package cn.van.business.model;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* @author Leo
|
||||
* @version 1.0
|
||||
* @create 2024/11/7 10:58
|
||||
* @description:
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "goods_info")
|
||||
public class GoodsInfoVO {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "owner")
|
||||
private String owner;
|
||||
|
||||
@Column(name = "main_sku_id")
|
||||
private String mainSkuId;
|
||||
|
||||
@Column(name = "product_id")
|
||||
private String productId;
|
||||
|
||||
@Column(name = "image_url")
|
||||
private String imageUrl;
|
||||
|
||||
@Column(name = "shop_name")
|
||||
private String shopName;
|
||||
|
||||
@Column(name = "shop_id")
|
||||
private String shopId;
|
||||
|
||||
// Getters and Setters
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
public void setOwner(String owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
|
||||
public String getMainSkuId() {
|
||||
return mainSkuId;
|
||||
}
|
||||
|
||||
public void setMainSkuId(String mainSkuId) {
|
||||
this.mainSkuId = mainSkuId;
|
||||
}
|
||||
|
||||
public String getProductId() {
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductId(String productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public String getShopName() {
|
||||
return shopName;
|
||||
}
|
||||
|
||||
public void setShopName(String shopName) {
|
||||
this.shopName = shopName;
|
||||
}
|
||||
|
||||
public String getShopId() {
|
||||
return shopId;
|
||||
}
|
||||
|
||||
public void setShopId(String shopId) {
|
||||
this.shopId = shopId;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import java.util.Date;
|
||||
|
||||
@Entity
|
||||
@Table(name = "order_rows")
|
||||
public class OrderRowVO {
|
||||
public class OrderRow {
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
private String id;
|
||||
@@ -30,6 +30,7 @@ public class OrderRowVO {
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "finish_time")
|
||||
/**完成时间(购买用户确认收货时间),格式yyyy-MM-dd HH:mm:ss*/
|
||||
private Date finishTime;
|
||||
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@@ -49,12 +50,21 @@ public class OrderRowVO {
|
||||
private Long skuId;
|
||||
|
||||
@Column(name = "sku_name")
|
||||
/**
|
||||
* 商品名称
|
||||
* */
|
||||
private String skuName;
|
||||
|
||||
@Column(name = "sku_num")
|
||||
/**
|
||||
*
|
||||
* 商品数量*/
|
||||
private Integer skuNum;
|
||||
|
||||
@Column(name = "sku_return_num")
|
||||
/**
|
||||
*
|
||||
* 商品已退货数量*/
|
||||
private Integer skuReturnNum;
|
||||
|
||||
@Column(name = "sku_frozen_num")
|
||||
@@ -64,6 +74,7 @@ public class OrderRowVO {
|
||||
private Double price;
|
||||
|
||||
@Column(name = "commission_rate")
|
||||
/**佣金比例(投放的广告主计划比例)*/
|
||||
private Double commissionRate;
|
||||
|
||||
@Column(name = "sub_side_rate")
|
||||
@@ -155,11 +166,8 @@ public class OrderRowVO {
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "goods_info_id", referencedColumnName = "id")
|
||||
private GoodsInfo goodsInfo;
|
||||
private GoodsInfoVO goodsInfo;
|
||||
|
||||
@OneToOne(cascade = CascadeType.ALL)
|
||||
@JoinColumn(name = "category_info_id", referencedColumnName = "id")
|
||||
private CategoryInfoVO categoryInfoVO;
|
||||
|
||||
@Column(name = "express_status")
|
||||
private Integer expressStatus;
|
||||
@@ -179,8 +187,6 @@ public class OrderRowVO {
|
||||
@Column(name = "order_tag")
|
||||
private String orderTag;
|
||||
|
||||
public OrderRowVO() {
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
@@ -542,22 +548,14 @@ public class OrderRowVO {
|
||||
this.rid = rid;
|
||||
}
|
||||
|
||||
public GoodsInfo getGoodsInfo() {
|
||||
public GoodsInfoVO getGoodsInfo() {
|
||||
return goodsInfo;
|
||||
}
|
||||
|
||||
public void setGoodsInfo(GoodsInfo goodsInfo) {
|
||||
public void setGoodsInfo(GoodsInfoVO goodsInfo) {
|
||||
this.goodsInfo = goodsInfo;
|
||||
}
|
||||
|
||||
public CategoryInfo getCategoryInfo() {
|
||||
return categoryInfo;
|
||||
}
|
||||
|
||||
public void setCategoryInfo(CategoryInfo categoryInfo) {
|
||||
this.categoryInfo = categoryInfo;
|
||||
}
|
||||
|
||||
public Integer getExpressStatus() {
|
||||
return expressStatus;
|
||||
}
|
||||
|
||||
74
src/main/java/cn/van/business/model/update-schema.sql
Normal file
74
src/main/java/cn/van/business/model/update-schema.sql
Normal file
@@ -0,0 +1,74 @@
|
||||
CREATE TABLE goods_info
|
||||
(
|
||||
id BIGINT AUTO_INCREMENT NOT NULL,
|
||||
owner VARCHAR(255) NULL,
|
||||
main_sku_id VARCHAR(255) NULL,
|
||||
product_id VARCHAR(255) NULL,
|
||||
image_url VARCHAR(255) NULL,
|
||||
shop_name VARCHAR(255) NULL,
|
||||
shop_id VARCHAR(255) NULL,
|
||||
CONSTRAINT pk_goods_info PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE order_rows
|
||||
(
|
||||
id VARCHAR(255) NOT NULL,
|
||||
order_id BIGINT NULL,
|
||||
parent_id BIGINT NULL,
|
||||
order_time datetime NULL,
|
||||
finish_time datetime NULL,
|
||||
modify_time datetime NULL,
|
||||
order_emt INT NULL,
|
||||
plus INT NULL,
|
||||
union_id BIGINT NULL,
|
||||
sku_id BIGINT NULL,
|
||||
sku_name VARCHAR(255) NULL,
|
||||
sku_num INT NULL,
|
||||
sku_return_num INT NULL,
|
||||
sku_frozen_num INT NULL,
|
||||
price DOUBLE NULL,
|
||||
commission_rate DOUBLE NULL,
|
||||
sub_side_rate DOUBLE NULL,
|
||||
subsidy_rate DOUBLE NULL,
|
||||
final_rate DOUBLE NULL,
|
||||
estimate_cos_price DOUBLE NULL,
|
||||
estimate_fee DOUBLE NULL,
|
||||
actual_cos_price DOUBLE NULL,
|
||||
actual_fee DOUBLE NULL,
|
||||
valid_code INT NULL,
|
||||
trace_type INT NULL,
|
||||
position_id BIGINT NULL,
|
||||
site_id BIGINT NULL,
|
||||
union_alias VARCHAR(255) NULL,
|
||||
pid VARCHAR(255) NULL,
|
||||
cid1 BIGINT NULL,
|
||||
cid2 BIGINT NULL,
|
||||
cid3 BIGINT NULL,
|
||||
sub_union_id VARCHAR(255) NULL,
|
||||
union_tag VARCHAR(255) NULL,
|
||||
pop_id BIGINT NULL,
|
||||
ext1 VARCHAR(255) NULL,
|
||||
pay_month VARCHAR(255) NULL,
|
||||
cp_act_id BIGINT NULL,
|
||||
union_role INT NULL,
|
||||
gift_coupon_ocs_amount DOUBLE NULL,
|
||||
gift_coupon_key VARCHAR(255) NULL,
|
||||
balance_ext VARCHAR(255) NULL,
|
||||
sign VARCHAR(255) NULL,
|
||||
pro_price_amount DOUBLE NULL,
|
||||
rid BIGINT NULL,
|
||||
goods_info_id BIGINT NULL,
|
||||
express_status INT NULL,
|
||||
channel_id BIGINT NULL,
|
||||
sku_tag VARCHAR(255) NULL,
|
||||
item_id VARCHAR(255) NULL,
|
||||
caller_item_id VARCHAR(255) NULL,
|
||||
order_tag VARCHAR(255) NULL,
|
||||
CONSTRAINT pk_order_rows PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
ALTER TABLE order_rows
|
||||
ADD CONSTRAINT uc_order_rows_goods_info UNIQUE (goods_info_id);
|
||||
|
||||
ALTER TABLE order_rows
|
||||
ADD CONSTRAINT FK_ORDER_ROWS_ON_GOODS_INFO FOREIGN KEY (goods_info_id) REFERENCES goods_info (id);
|
||||
Reference in New Issue
Block a user