Browse Source

1:对products增加索引,
2:调整order字段的信息

yujia 8 years ago
parent
commit
cec7d1ca7a

+ 3 - 1
src/main/java/com/uas/platform/b2c/prod/commodity/model/Product.java

@@ -14,7 +14,9 @@ import java.util.Set;
  *
  */
 @Entity
-@Table(name = "products")
+@Table(name = "products", indexes = {@Index(name = "products_code_index", columnList = "pr_code"),
+@Index(name = "products_enuu_index", columnList = "pr_enuu"),
+@Index(name = "products_enuu_code_index", columnList = "pr_code, pr_enuu", unique = true)})
 @Logger
 //@Cacheable
 //@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "com.uas.platform.b2b.model.Product")

+ 32 - 33
src/main/java/com/uas/platform/b2c/trade/order/model/Order.java

@@ -147,37 +147,37 @@ public class Order extends Document implements Serializable {
 	/**
 	 * 使用的配送规则
 	 */
-	@Column(name = "or_rule", length = 2000)
+	@Column(name = "or_rule", columnDefinition = "TEXT")
 	private String jsonRule;
 
 	/**
 	 * 拆单之前的配送规则列表
 	 */
-	@Column(name = "or_rules", length = 4000)
+	@Column(name = "or_rules", columnDefinition = "TEXT")
 	private String jsonMoreRule;
 
 	/**
 	 * 自提点信息
 	 */
-	@Column(name = "or_take_self", length = 2000)
+	@Column(name = "or_take_self", columnDefinition = "TEXT")
 	private String jsonTakeSelf;
 
 	/**
 	 * 拆单之前的自提点信息
 	 */
-	@Column(name = "or_take_selfs", length = 4000)
+	@Column(name = "or_take_selfs", columnDefinition = "TEXT")
 	private String jsonMoreTake;
 
 	/**
 	 * 收货地址 这里使用json字符串的形式将收货地址整个存起来
 	 */
-	@Column(name = "or_addr", length = 2000)
+	@Column(name = "or_addr", columnDefinition = "TEXT")
 	private String jsonAddress;
 
 	/**
 	 * 发货地址 这里使用json字符串的形式将收货地址整个存起来
 	 */
-	@Column(name = "in_sd_addr", length = 2000)
+	@Column(name = "in_sd_addr", columnDefinition = "TEXT")
 	private String jsonSdAddress;
 
     /**
@@ -217,24 +217,6 @@ public class Order extends Document implements Serializable {
 	private Long invoiceid;
 
 
-	/**
-	 * Gets invoiceid.
-	 *
-	 * @return the invoiceid
-	 */
-	public Long getInvoiceid() {
-		return invoiceid;
-	}
-
-	/**
-	 * Sets invoiceid.
-	 *
-	 * @param invoiceid the invoiceid
-	 */
-	public void setInvoiceid(Long invoiceid) {
-		this.invoiceid = invoiceid;
-	}
-
 	/**
 	 * 发票抬头
 	 */
@@ -244,7 +226,7 @@ public class Order extends Document implements Serializable {
 	/**
 	 * 发票的地址
 	 */
-	@Column(name = "or_invoice_address", length = 2000)
+	@Column(name = "or_invoice_address", columnDefinition = "TEXT")
 	private String invoiceAddress;
 
 	/**
@@ -275,13 +257,13 @@ public class Order extends Document implements Serializable {
 	/**
 	 * 付款方账户信息
 	 */
-	@Column(name = "or_buyaccount")
+	@Column(name = "or_buyaccount", columnDefinition = "TEXT")
 	private String buyaccount;
 
 	/**
 	 * 收款方信息
 	 */
-	@Column(name = "or_selleraccount")
+	@Column(name = "or_selleraccount", columnDefinition = "TEXT")
 	private String selleraccount;
 
 	/**
@@ -311,7 +293,7 @@ public class Order extends Document implements Serializable {
 	/**
 	 * 失效原因
 	 */
-	@Column(name = "or_unavailablereason")
+	@Column(name = "or_unavailablereason", length = 255)
 	private String unavailableReason;
 
 	/**
@@ -331,7 +313,7 @@ public class Order extends Document implements Serializable {
 	/**
 	 * 审核不通过的原因
 	 */
-	@Column(name = "or_auditpayfailreason")
+	@Column(name = "or_auditpayfailreason", length = 255)
 	private String auditPayFailReason;
 
 	/**
@@ -367,19 +349,19 @@ public class Order extends Document implements Serializable {
 	/**
 	 * 币别
 	 */
-	@Column(name = "or_currency")
+	@Column(name = "or_currency", length = 50)
 	private String currency;
 
 	/**
 	 * 状态变更记录 List<StatusHistory> -> Json
 	 */
-	@Column(name = "or_statushistory", length = 4000)
+	@Column(name = "or_statushistory", columnDefinition = "TEXT")
 	private String statushistory;
 
 	/**
 	 * 转的发货单流水号
 	 */
-	@Column(name = "in_id")
+	@Column(name = "in_id", length = 50)
 	private String inid;
 
 	/**
@@ -1459,7 +1441,7 @@ public class Order extends Document implements Serializable {
 	 *
 	 * @param uu the uu
 	 */
-/*
+	/*
 	 * 确认状态下的供应商拒绝
 	 */
 	public void setStatusComfirmDisagree(Long uu) {
@@ -2736,6 +2718,23 @@ public class Order extends Document implements Serializable {
 		return this;
 	}
 
+	/**
+	 * Gets invoiceid.
+	 *
+	 * @return the invoiceid
+	 */
+	public Long getInvoiceid() {
+		return invoiceid;
+	}
+
+	/**
+	 * Sets invoiceid.
+	 *
+	 * @param invoiceid the invoiceid
+	 */
+	public void setInvoiceid(Long invoiceid) {
+		this.invoiceid = invoiceid;
+	}
 	/**
 	 * Gets dissociative.
 	 *

+ 2 - 2
src/main/java/com/uas/platform/b2c/trade/order/model/Purchase.java

@@ -198,7 +198,7 @@ public class Purchase extends Document implements Serializable {
 	/**
 	 * 状态变更记录 List<StatusHistory> -> Json
 	 */
-	@Column(name = "pu_statushistory", length = 4000)
+	@Column(name = "pu_statushistory", columnDefinition = "TEXT")
 	private String statushistory;
 
 	/**
@@ -450,7 +450,7 @@ public class Purchase extends Document implements Serializable {
 	/**
 	 * 交易备注
 	 */
-	@Column(name = "pu_remark", length = 4000)
+	@Column(name = "pu_remark", columnDefinition = "TEXT")
 	private String purchaseRemark;
 
 	/**