Browse Source

订单、库存、收藏等加上规格信息

yujia 7 years ago
parent
commit
6d4e2b410e

+ 16 - 0
src/main/java/com/uas/platform/b2c/prod/commodity/model/GoodsSimple.java

@@ -221,6 +221,12 @@ public class GoodsSimple {
 	@Column(name = "go_isbreakup", columnDefinition = "TINYINT(1)")
 	private Boolean breakUp;
 
+	/**
+	 * 规格信息
+	 */
+	@Column(name ="go_spec")
+	private String spec;
+
 	/**
 	 * 包装
 	 */
@@ -518,6 +524,15 @@ public class GoodsSimple {
 		return this;
 	}
 
+	public String getSpec() {
+		return spec;
+	}
+
+	public GoodsSimple setSpec(String spec) {
+		this.spec = spec;
+		return this;
+	}
+
 	public GoodsSimple() {
 		
 	}
@@ -575,6 +590,7 @@ public class GoodsSimple {
 		this.status = goods.getStatus();
 		this.perQty = goods.getPerQty();
 		this.breakUp = goods.getBreakUp();
+		this.spec = goods.getSpec();
 	}
 
 	public Short getB2cDeliveryDemMaxTime() {

+ 16 - 0
src/main/java/com/uas/platform/b2c/prod/product/component/modal/Component.java

@@ -84,6 +84,12 @@ public class Component implements Serializable {
 	@Column(name = "cmp_encapsulation")
 	private String encapsulation;
 
+	/**
+	 * 规格信息
+	 */
+	@Column(name = "cmp_spec")
+	private String spec;
+
 	/**
 	 * 器件的标准单位
 	 */
@@ -330,6 +336,16 @@ public class Component implements Serializable {
 	// @Column(name = "cmp_wastageqty")
 	// private Double wastageQty;
 
+
+	public String getSpec() {
+		return spec;
+	}
+
+	public Component setSpec(String spec) {
+		this.spec = spec;
+		return this;
+	}
+
 	public Long getId() {
 		return id;
 	}

+ 15 - 0
src/main/java/com/uas/platform/b2c/prod/product/component/modal/ComponentInfo.java

@@ -204,6 +204,12 @@ public class ComponentInfo implements Serializable {
 	@Column(name = "cmp_description", length = 4000)
 	private String description;
 
+	/**
+	 * 规格信息
+	 */
+	@Column(name = "cmp_spec")
+	private String spec;
+
 	/**
 	 * 废料数量
 	 */
@@ -501,6 +507,15 @@ public class ComponentInfo implements Serializable {
 		return this;
 	}
 
+	public String getSpec() {
+		return spec;
+	}
+
+	public ComponentInfo setSpec(String spec) {
+		this.spec = spec;
+		return this;
+	}
+
 	/*
 	 * public ComponentInfoUas convertUas(ComponentInfo info){ ComponentInfoUas uas = new ComponentInfoUas(); uas.setAttach(info.getAttach()); uas.setBrandid(info.getBrandid()); uas.setCode(info.getCode()); uas.setExcessQty(info.getExcessQty()); uas.setId(info.getId()); uas.setImg(info.getImg()); uas.setKindid(info.getKindid()); uas.setMaxDelivery(info.getMaxDelivery()); uas.setMinBuyQty(info.getMinBuyQty()); uas.setMinDelivery(info.getMinDelivery()); uas.setMinPrice(info.getMinPrice());
 	 * uas.setOrderNumber(info.getOrderNumber()); uas.setOrderQty(info.getOrderQty()); uas.setOriginalQty(info.getOriginalQty()); uas.setPackaging(info.getPackaging()); uas.setReserve(info.getReserve()); uas.setReserveType(info.getReserveType()); uas.setSampleQty(info.getSampleQty()); uas.setSpec(info.getSpec()); uas.setUnit(info.getUnit()); uas.setUuid(info.getUuid()); uas.setWeight(info.getWeight());; return uas; }

+ 15 - 0
src/main/java/com/uas/platform/b2c/trade/order/model/OrderDetail.java

@@ -354,6 +354,12 @@ public class OrderDetail extends Document implements Serializable{
 	 */
 	@Column(name = "go_usd_tax_rate")
 	private Double usdTaxRate;
+
+	/**
+	 * 规格信息
+	 */
+	@Column(name = "go_spec")
+	private String spec;
 	
 	/**
 	 * rmb分段报价
@@ -1808,6 +1814,15 @@ public class OrderDetail extends Document implements Serializable{
 		return this;
 	}
 
+	public String getSpec() {
+		return spec;
+	}
+
+	public OrderDetail setSpec(String spec) {
+		this.spec = spec;
+		return this;
+	}
+
 	/**
 	 * 计算确认总价
 	 *

+ 1 - 0
src/main/java/com/uas/platform/b2c/trade/order/service/impl/OrderDetailServiceImpl.java

@@ -201,6 +201,7 @@ public class OrderDetailServiceImpl implements OrderDetailService {
 		orderDetail.setStoreid(goods.getStoreid());
 		orderDetail.setStoreName(goods.getStoreName());
 		orderDetail.setDeliveryTime(goods);
+		orderDetail.setSpec(goods.getSpec());
 		String detailid = EncodingRulesConstant.ORDER_DETAIL.replace("_TIMESTAP_NUMBER", createNumberService.getTimeNumber("trade$order_detail", 9));
 		orderDetail.setDetailid(detailid);
 		return orderDetail;

+ 1 - 0
src/main/java/com/uas/platform/b2c/trade/presale/controller/CollectionController.java

@@ -164,6 +164,7 @@ public class CollectionController {
 			if (componentInfo != null){
 				Collection store = new Collection();
 				store.setComponentid(componentInfo.getId());
+				store.setSpec(componentInfo.getSpec());
 				store.setUseruu(SystemSession.getUser().getUserUU());
 				if (SystemSession.getUser().getEnterprise() != null){
 					store.setDissociative(Type.ENTERPRISING.value());

+ 1 - 1
src/main/java/com/uas/platform/b2c/trade/presale/facade/impl/CartFacadeImpl.java

@@ -3,7 +3,6 @@ package com.uas.platform.b2c.trade.presale.facade.impl;
 import com.uas.platform.b2c.core.support.SystemSession;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.service.GoodsService;
-import com.uas.platform.b2c.prod.product.component.modal.Component;
 import com.uas.platform.b2c.prod.product.component.service.ComponentService;
 import com.uas.platform.b2c.trade.order.type.ResultMapType;
 import com.uas.platform.b2c.trade.presale.facade.CartFacade;
@@ -64,6 +63,7 @@ public class CartFacadeImpl implements CartFacade {
 		cart.setCode(goods.getCode());
 		cart.setKiName(goods.getKindNameCn());
 		cart.setBrName(goods.getBrandNameEn());
+		cart.setSpec(goods.getSpec());
 		cart.setUu(userUU);
 		cart.setEnuu(enUU);
 		ResultMap resultMap1 = cartService.saveCartRecord(cart);

+ 14 - 1
src/main/java/com/uas/platform/b2c/trade/presale/model/Cart.java

@@ -1,6 +1,5 @@
 package com.uas.platform.b2c.trade.presale.model;
 
-import com.uas.platform.b2c.common.account.model.Enterprise;
 import com.uas.platform.b2c.core.utils.NumberUtil;
 import com.uas.platform.b2c.prod.commodity.model.Goods;
 import com.uas.platform.b2c.prod.commodity.model.GoodsSimple;
@@ -218,6 +217,12 @@ public class Cart {
 	@Transient
 	private Integer similarCount;
 
+	/**
+	 * 规格信息
+	 */
+	@Column(name = "cart_spec")
+	private String spec;
+
 	public Long getId() {
 		return id;
 	}
@@ -581,4 +586,12 @@ public class Cart {
 				+ returnInWeek + ", tax=" + tax + ", currencyName=" + currencyName + ", goods=" + goods + "]";
 	}
 
+	public String getSpec() {
+		return spec;
+	}
+
+	public Cart setSpec(String spec) {
+		this.spec = spec;
+		return this;
+	}
 }

+ 15 - 0
src/main/java/com/uas/platform/b2c/trade/presale/model/Collection.java

@@ -81,6 +81,12 @@ public class Collection implements Serializable {
 	@Column(name = "store_dissociative")
 	private Integer dissociative;
 
+	/**
+	 * 规格信息
+	 */
+	@Column(name = "store_spec")
+	private String spec;
+
 	/**
 	 * 收藏类型
 	 */
@@ -196,4 +202,13 @@ public class Collection implements Serializable {
 	public void setDissociative(Integer dissociative) {
 		this.dissociative = dissociative;
 	}
+
+	public String getSpec() {
+		return spec;
+	}
+
+	public Collection setSpec(String spec) {
+		this.spec = spec;
+		return this;
+	}
 }

+ 15 - 0
src/main/java/com/uas/platform/b2c/trade/presale/model/CollectionInfo.java

@@ -56,6 +56,12 @@ public class CollectionInfo implements Serializable{
 	@Column(name = "store_dissociative")
 	private Integer dissociative;
 
+	/**
+	 * 规格信息
+	 */
+	@Column(name = "store_spec")
+	private String spec;
+
 	public Long getUseruu() {
 		return useruu;
 	}
@@ -111,4 +117,13 @@ public class CollectionInfo implements Serializable{
 	public void setDissociative(Integer dissociative) {
 		this.dissociative = dissociative;
 	}
+
+	public String getSpec() {
+		return spec;
+	}
+
+	public CollectionInfo setSpec(String spec) {
+		this.spec = spec;
+		return this;
+	}
 }

+ 1 - 0
src/main/java/com/uas/platform/b2c/trade/presale/service/impl/CartServiceImpl.java

@@ -158,6 +158,7 @@ public class CartServiceImpl implements CartService {
 			cart.setCode(code);
 			cart.setBrName(component.getBrand().getNameCn());
 			cart.setKiName(component.getKind().getNameCn());
+			cart.setSpec(component.getSpec());
 			cart.setImg(component.getImg());
 			// 设置商品信息
 			Goods goods = goodsService.findGoodsByBatchCode(cart.getBatchCode());