Commit 2a7360e0 by huiyang.chen

fix 返回商品券名称

parent b16452e2
......@@ -52,6 +52,10 @@ public class CartGoods {
* 商品券code
*/
private String couponCode;
/**
* 商品券名称
*/
private String couponName;
private String spuId;
private String skuId;
......
......@@ -294,8 +294,8 @@ public class CalculationServiceImpl {
* 配送金额
*/
private Long calculateDeliveryAmount(String receiveId, String partnerId, String storeId, String menuType) {
Long deliveryAmount = 0l;
if (StringUtils.isBlank(receiveId) || !BusinessTypeEnum.SAAS_DELIVERY.getCode().equals(menuType)) {
Long deliveryAmount = 1000l;
/* if (StringUtils.isBlank(receiveId) || !BusinessTypeEnum.SAAS_DELIVERY.getCode().equals(menuType)) {
return deliveryAmount;
}
String trackingNo = LogThreadLocal.getTrackingNo();
......@@ -319,7 +319,7 @@ public class CalculationServiceImpl {
// throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR);
// }
Double deliveryPrice = storeInfo.getBizVO().getDeliveryPrice()*100;
deliveryAmount = deliveryPrice.longValue();
deliveryAmount = deliveryPrice.longValue();*/
return deliveryAmount;
}
......
......@@ -109,6 +109,11 @@ public class CouponDiscountCalculation {
continue;
}
cartGoods.setAmount(goodsMap.get(cartGoods.getGoodsId()).getRealAmount());
List<ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount> discounts = goodsMap.get(cartGoods.getGoodsId()).getDiscounts();
if (CollectionUtils.isNotEmpty(discounts)) {
ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount goodsDiscount = discounts.stream().filter(t -> ActivityTypeEnum.TYPE_32.getCode().equals(t.getType())).findFirst().get();
cartGoods.setCouponName(goodsDiscount.getActivityName());
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment