1.直播商品名称不能超过14位。

2.添加虚拟订单类型
This commit is contained in:
lifenlong 2021-06-19 14:11:57 +08:00
parent 738a95edb6
commit 859689eec2
2 changed files with 10 additions and 2 deletions

View File

@ -170,6 +170,12 @@ public class WechatLivePlayerUtil {
String token = wechatAccessTokenUtil.cgiAccessToken(ClientTypeEnum.WECHAT_MP); String token = wechatAccessTokenUtil.cgiAccessToken(ClientTypeEnum.WECHAT_MP);
//发送url //发送url
String url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/add?access_token=" + token; 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 //新建微信商品DTO
GoodsInfo goodsInfo = new GoodsInfo(commodity); GoodsInfo goodsInfo = new GoodsInfo(commodity);
//上传微信临时图片 //上传微信临时图片

View File

@ -222,11 +222,13 @@ public class Order extends BaseEntity {
//订单类型判断--普通订单活动订单 //订单类型判断--普通订单活动订单
if (tradeDTO.getCartTypeEnum().equals(CartTypeEnum.CART) || tradeDTO.getCartTypeEnum().equals(CartTypeEnum.BUY_NOW)) { if (tradeDTO.getCartTypeEnum().equals(CartTypeEnum.CART) || tradeDTO.getCartTypeEnum().equals(CartTypeEnum.BUY_NOW)) {
this.setOrderType(OrderTypeEnum.NORMAL.name()); this.setOrderType(OrderTypeEnum.NORMAL.name());
} else { } else if (tradeDTO.getCartTypeEnum().equals(CartTypeEnum.VIRTUAL)) {
this.setOrderType(tradeDTO.getCartTypeEnum().name()); this.setOrderType(tradeDTO.getCartTypeEnum().name());
} else {
this.setOrderType(OrderTypeEnum.NORMAL.name());
} }
this.setId(oldId); this.setId(oldId);
this.setOrderType(OrderTypeEnum.NORMAL.name());
//促销信息填充 //促销信息填充
if (cartVO.getSkuList().get(0).getPromotions() != null && tradeDTO.getCartTypeEnum().equals(CartTypeEnum.PINTUAN)) { 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(); Optional<String> pintuanId = cartVO.getSkuList().get(0).getPromotions().stream().filter(i -> i.getPromotionType().equals(PromotionTypeEnum.PINTUAN.name())).map(PromotionGoods::getPromotionId).findFirst();