1.直播商品名称不能超过14位。
2.添加虚拟订单类型
This commit is contained in:
		
							parent
							
								
									738a95edb6
								
							
						
					
					
						commit
						859689eec2
					
				| @ -170,6 +170,12 @@ public class WechatLivePlayerUtil { | ||||
|         String token = wechatAccessTokenUtil.cgiAccessToken(ClientTypeEnum.WECHAT_MP); | ||||
|         //发送url | ||||
|         String url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/add?access_token=" + token; | ||||
| 
 | ||||
|         //商品名称,最长14个汉字 | ||||
|         if (commodity.getName().length() > 14) { | ||||
|             commodity.setName(commodity.getName().substring(0, 13)); | ||||
|         } | ||||
| 
 | ||||
|         //新建微信商品DTO | ||||
|         GoodsInfo goodsInfo = new GoodsInfo(commodity); | ||||
|         //上传微信临时图片 | ||||
|  | ||||
| @ -222,11 +222,13 @@ public class Order extends BaseEntity { | ||||
|         //订单类型判断--普通订单,活动订单。 | ||||
|         if (tradeDTO.getCartTypeEnum().equals(CartTypeEnum.CART) || tradeDTO.getCartTypeEnum().equals(CartTypeEnum.BUY_NOW)) { | ||||
|             this.setOrderType(OrderTypeEnum.NORMAL.name()); | ||||
|         }  else { | ||||
|         } else if (tradeDTO.getCartTypeEnum().equals(CartTypeEnum.VIRTUAL)) { | ||||
|             this.setOrderType(tradeDTO.getCartTypeEnum().name()); | ||||
|         } else { | ||||
|             this.setOrderType(OrderTypeEnum.NORMAL.name()); | ||||
|         } | ||||
|         this.setId(oldId); | ||||
|         this.setOrderType(OrderTypeEnum.NORMAL.name()); | ||||
| 
 | ||||
|         //促销信息填充 | ||||
|         if (cartVO.getSkuList().get(0).getPromotions() != null && tradeDTO.getCartTypeEnum().equals(CartTypeEnum.PINTUAN)) { | ||||
|             Optional<String> pintuanId = cartVO.getSkuList().get(0).getPromotions().stream().filter(i -> i.getPromotionType().equals(PromotionTypeEnum.PINTUAN.name())).map(PromotionGoods::getPromotionId).findFirst(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 lifenlong
						lifenlong