Kaynağa Gözat

爱贝源bug修改

wangxiaoming 7 yıl önce
ebeveyn
işleme
0588938324

+ 20 - 0
iamberry-common-core/src/main/java/com/iamberry/wechat/core/entity/product/Product.java

@@ -52,8 +52,12 @@ public class Product implements java.io.Serializable{
 											//			5:青色	6:蓝色	7:紫色	8:白色
 	private ProductType productType;			//商品类型
 
+	private String productTypeName;			//商品类型名称
+
 	private String productChildType;		//产品关联小类
 
+	private String productChildTypeName;			//商品小类类型名称
+
 	private Integer productChoiceness;		//精选类型0:非精选1:精选置顶2:精选排后
 
 	private String productChoicenessIm;		//精选图片
@@ -291,6 +295,22 @@ public class Product implements java.io.Serializable{
 		this.productChildType = productChildType;
 	}
 
+	public String getProductTypeName() {
+		return productTypeName;
+	}
+
+	public void setProductTypeName(String productTypeName) {
+		this.productTypeName = productTypeName;
+	}
+
+	public String getProductChildTypeName() {
+		return productChildTypeName;
+	}
+
+	public void setProductChildTypeName(String productChildTypeName) {
+		this.productChildTypeName = productChildTypeName;
+	}
+
 	@Override
 	public String toString() {
 		return "Product [productId=" + productId + ", productName="

+ 10 - 0
iamberry-common-core/src/main/java/com/iamberry/wechat/core/entity/product/ProductColor.java

@@ -33,6 +33,8 @@ public class ProductColor implements java.io.Serializable {
     private Integer cartId; //购物车id
     private Integer cartNum;//购物车数量
 
+    private String colorCode; //颜色代码
+
     public Integer getColorStatus() {
         return colorStatus;
     }
@@ -176,4 +178,12 @@ public class ProductColor implements java.io.Serializable {
     public void setCartNum(Integer cartNum) {
         this.cartNum = cartNum;
     }
+
+    public String getColorCode() {
+        return colorCode;
+    }
+
+    public void setColorCode(String colorCode) {
+        this.colorCode = colorCode;
+    }
 }

+ 17 - 15
iamberry-wechat-service/src/main/java/com/iamberry/wechat/service/mapper/productInfoMapper.xml

@@ -10,20 +10,21 @@
 	</sql>
 
 	<resultMap id="productMap" type="Product">
-	<id column="product_id" property="productId"/>
-	<result column="product_name" property="productName"/>
-	<result column="product_abbreviation" property="productAbbreviation"/>
-	<result column="product_salesnum" property="productSalesnum"/>
-	<result column="product_accessnum" property="productAccessnum"/>
-	<result column="product_status" property="productStatus"/>
-	<result column="product_parameter_img" property="productParameterImg"/>
-	<result column="PRODUCT_CREATE_DATE" property="productCreateDate"/>
-	<result column="PRODUCT_SORT_NUM" property="productSortNum"/>
-	<result column="PRODUCT_COLOR_DES" property="productColorDes"/>
-	<result column="PRODUCT_REMARK" property="productRemark"/>
-	<result column="PRODUCT_CHOICENESS" property="productChoiceness"/>
-	<result column="product_choiceness_im" property="productChoicenessIm"/>
-	<result column="product_child_type" property="productChildType"/>
+		<id column="product_id" property="productId"/>
+		<result column="product_name" property="productName"/>
+		<result column="product_abbreviation" property="productAbbreviation"/>
+		<result column="product_salesnum" property="productSalesnum"/>
+		<result column="product_accessnum" property="productAccessnum"/>
+		<result column="product_status" property="productStatus"/>
+		<result column="product_parameter_img" property="productParameterImg"/>
+		<result column="PRODUCT_CREATE_DATE" property="productCreateDate"/>
+		<result column="PRODUCT_SORT_NUM" property="productSortNum"/>
+		<result column="PRODUCT_COLOR_DES" property="productColorDes"/>
+		<result column="PRODUCT_REMARK" property="productRemark"/>
+		<result column="PRODUCT_CHOICENESS" property="productChoiceness"/>
+		<result column="product_choiceness_im" property="productChoicenessIm"/>
+		<result column="product_child_type" property="productChildType"/>
+		<result column="child_type_name" property="productChildTypeName"/>
 	<collection property="productColorList" column="product_id" ofType="colorMap" select="selectProductColor"/>
 </resultMap>
 
@@ -59,7 +60,8 @@
 		PRODUCT_REMARK,
 		PRODUCT_CHOICENESS,
 		product_child_type,
-		product_choiceness_im
+		product_choiceness_im,
+		tb_iamberry_product_child_type.child_type_name
 		FROM 
 			TB_IAMBERRY_PRODUCT_INFO
 		LEFT JOIN TB_IAMBERRY_PRODUCT_COLOR on TB_IAMBERRY_PRODUCT_INFO.product_id = TB_IAMBERRY_PRODUCT_COLOR.color_product_id

+ 16 - 9
iamberry-wechat-web/src/main/java/com/iamberry/wechat/handles/admin/AdminOrderHandlers.java

@@ -397,15 +397,22 @@ public class AdminOrderHandlers {
 					}
 					//给用户发送消息-已发货的通知
 					
-					
-					//消息内容
-					String data = ResultInfo.ORDERPACKAGETEMP;
-					data = data.replaceFirst("firstValueOrder", ResultInfo.SHIPMENTMESSAGE)
-						.replaceFirst("orderIdValueOrder",  orderId)
-						.replaceFirst("orderValuePackageId",SendMessageUtil.hashmap.get(actionDto.getPostFirm())+":"+actionDto.getPostNum())
-						.replaceFirst("orderRemarkValue", ResultInfo.INTOSHOP);
-					sendMessageUtil.sendTemplateMessageToOpenid(data, currentOrder.getSalesOpenid(), ResultInfo.PAGE_SHIPMENT+orderId, 2);
-					
+					/*发货推送*/
+					Order newOrder = adminOrderService.selectOrderStatusByOrderId(orderId);
+					try {
+						sendMessageUtil.orderSendSuccess(
+								"尊敬的用户,您的订单已发货,物流信息:",
+								orderId,
+								SendMessageUtil.hashmap.get(newOrder.getSalesPostFirm()),
+								newOrder.getSalesPostNum(),
+								newOrder.getSalesAddressInfo(),
+								ResultInfo.sendRemark1,
+								newOrder.getSalesOpenid(),
+								ResultInfo.ORDER_DETAIL+order.getSalesOrderid()
+						);
+					} catch (Exception e) {
+						logger.info("订单号:"+ order.getSalesOrderid() +"的订单已发货,发送微信消息失败!");
+					}
 					return mv;
 				} else {
 					mv.addObject("msgObj", new MessageDto(false, "对不起,取消订单失败", "对不起,取消订单失败,请稍后重试!"));