Commit 2a7360e0 by huiyang.chen

fix 返回商品券名称

parent b16452e2
...@@ -52,6 +52,10 @@ public class CartGoods { ...@@ -52,6 +52,10 @@ public class CartGoods {
* 商品券code * 商品券code
*/ */
private String couponCode; private String couponCode;
/**
* 商品券名称
*/
private String couponName;
private String spuId; private String spuId;
private String skuId; private String skuId;
......
...@@ -294,8 +294,8 @@ public class CalculationServiceImpl { ...@@ -294,8 +294,8 @@ public class CalculationServiceImpl {
* 配送金额 * 配送金额
*/ */
private Long calculateDeliveryAmount(String receiveId, String partnerId, String storeId, String menuType) { private Long calculateDeliveryAmount(String receiveId, String partnerId, String storeId, String menuType) {
Long deliveryAmount = 0l; Long deliveryAmount = 1000l;
if (StringUtils.isBlank(receiveId) || !BusinessTypeEnum.SAAS_DELIVERY.getCode().equals(menuType)) { /* if (StringUtils.isBlank(receiveId) || !BusinessTypeEnum.SAAS_DELIVERY.getCode().equals(menuType)) {
return deliveryAmount; return deliveryAmount;
} }
String trackingNo = LogThreadLocal.getTrackingNo(); String trackingNo = LogThreadLocal.getTrackingNo();
...@@ -319,7 +319,7 @@ public class CalculationServiceImpl { ...@@ -319,7 +319,7 @@ public class CalculationServiceImpl {
// throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR); // throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR);
// } // }
Double deliveryPrice = storeInfo.getBizVO().getDeliveryPrice()*100; Double deliveryPrice = storeInfo.getBizVO().getDeliveryPrice()*100;
deliveryAmount = deliveryPrice.longValue(); deliveryAmount = deliveryPrice.longValue();*/
return deliveryAmount; return deliveryAmount;
} }
......
...@@ -109,6 +109,11 @@ public class CouponDiscountCalculation { ...@@ -109,6 +109,11 @@ public class CouponDiscountCalculation {
continue; continue;
} }
cartGoods.setAmount(goodsMap.get(cartGoods.getGoodsId()).getRealAmount()); 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