From 859689eec224c303d8885a1bde9c542dd2def5db Mon Sep 17 00:00:00 2001 From: lifenlong Date: Sat, 19 Jun 2021 14:11:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=9B=B4=E6=92=AD=E5=95=86=E5=93=81=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E4=B8=8D=E8=83=BD=E8=B6=85=E8=BF=8714=E4=BD=8D?= =?UTF-8?q?=E3=80=82=202.=E6=B7=BB=E5=8A=A0=E8=99=9A=E6=8B=9F=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili/modules/broadcast/util/WechatLivePlayerUtil.java | 6 ++++++ .../java/cn/lili/modules/order/order/entity/dos/Order.java | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/broadcast/util/WechatLivePlayerUtil.java b/framework/src/main/java/cn/lili/modules/broadcast/util/WechatLivePlayerUtil.java index a853bae5..702c284f 100644 --- a/framework/src/main/java/cn/lili/modules/broadcast/util/WechatLivePlayerUtil.java +++ b/framework/src/main/java/cn/lili/modules/broadcast/util/WechatLivePlayerUtil.java @@ -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); //上传微信临时图片 diff --git a/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java b/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java index 89782321..09903e68 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java +++ b/framework/src/main/java/cn/lili/modules/order/order/entity/dos/Order.java @@ -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 pintuanId = cartVO.getSkuList().get(0).getPromotions().stream().filter(i -> i.getPromotionType().equals(PromotionTypeEnum.PINTUAN.name())).map(PromotionGoods::getPromotionId).findFirst();