Commit 521527dc by ping.wu

注释无用代码

parent b82cc67e
......@@ -66,49 +66,49 @@ public class ActivityAdapter {
return activityQueryRequestDto;
}
public ActivityCalculationDiscountRequestDto convert2ActivityCalculationDiscountRequestDto(ShoppingCartInfoDto shoppingCartInfoDto
, String partnerCode, String storeId, String appid, Integer orderType, CouponListResponseDto.CouponBean couponBean, Long promotionAmount) {
if (shoppingCartInfoDto == null || CollectionUtils.isEmpty(shoppingCartInfoDto.getData())) {
return null;
}
ActivityCalculationDiscountRequestDto result = new ActivityCalculationDiscountRequestDto();
result.setVer(Integer.valueOf(Version.VERSION_1));
result.setPartnerCode(partnerCode);
result.setStoreId(storeId);
ActivityChannelEnum activityChannelEnum = PropertyConvertUtil.orderTypeConvert2ActivityChannel(orderType);
if(!Objects.isNull(activityChannelEnum)) {
result.setChannel(activityChannelEnum.getCode());
}
result.setAppId(appid);
result.setIsShowActivities(1);
result.setIsShowGoodsActivity(1);
List<ActivityCalculationDiscountRequestDto.CalculationDiscountGoods> goods = new ArrayList<>();
// TODO 暂时指定成一个商品,后期优化
ActivityCalculationDiscountRequestDto.CalculationDiscountGoods calculationDiscountGoods = new ActivityCalculationDiscountRequestDto.CalculationDiscountGoods();
calculationDiscountGoods.setGoodsId("1");
calculationDiscountGoods.setCategory("1");
calculationDiscountGoods.setGoodsQuantity(1);
Long amount = 0L;
if (shoppingCartInfoDto.getAmount() != null) {
amount = shoppingCartInfoDto.getAmount();
}
Long packAmount = 0L;
// 外卖才有打包费
if (shoppingCartInfoDto.getPackAmount() != null && Objects.equals(CreateOrderType.TAKE_OUT.getCode(), orderType)) {
packAmount = shoppingCartInfoDto.getPackAmount();
}
Long couponAmount = 0L;
if (couponBean != null && couponBean.getDiscountAmount() != null) {
couponAmount = Long.valueOf(couponBean.getDiscountAmount());
}
if (promotionAmount == null) {
promotionAmount = 0L;
}
calculationDiscountGoods.setOriginalPrice(amount + packAmount - couponAmount - promotionAmount);
goods.add(calculationDiscountGoods);
result.setGoods(goods);
return result;
}
// public ActivityCalculationDiscountRequestDto convert2ActivityCalculationDiscountRequestDto(ShoppingCartInfoDto shoppingCartInfoDto
// , String partnerCode, String storeId, String appid, Integer orderType, CouponListResponseDto.CouponBean couponBean, Long promotionAmount) {
// if (shoppingCartInfoDto == null || CollectionUtils.isEmpty(shoppingCartInfoDto.getData())) {
// return null;
// }
// ActivityCalculationDiscountRequestDto result = new ActivityCalculationDiscountRequestDto();
// result.setVer(Integer.valueOf(Version.VERSION_1));
// result.setPartnerCode(partnerCode);
// result.setStoreId(storeId);
// ActivityChannelEnum activityChannelEnum = PropertyConvertUtil.orderTypeConvert2ActivityChannel(orderType);
// if(!Objects.isNull(activityChannelEnum)) {
// result.setChannel(activityChannelEnum.getCode());
// }
// result.setAppId(appid);
// result.setIsShowActivities(1);
// result.setIsShowGoodsActivity(1);
// List<ActivityCalculationDiscountRequestDto.CalculationDiscountGoods> goods = new ArrayList<>();
// // TODO 暂时指定成一个商品,后期优化
// ActivityCalculationDiscountRequestDto.CalculationDiscountGoods calculationDiscountGoods = new ActivityCalculationDiscountRequestDto.CalculationDiscountGoods();
// calculationDiscountGoods.setGoodsId("1");
// calculationDiscountGoods.setCategory("1");
// calculationDiscountGoods.setGoodsQuantity(1);
// Long amount = 0L;
// if (shoppingCartInfoDto.getAmount() != null) {
// amount = shoppingCartInfoDto.getAmount();
// }
// Long packAmount = 0L;
// // 外卖才有打包费
// if (shoppingCartInfoDto.getPackAmount() != null && Objects.equals(CreateOrderType.TAKE_OUT.getCode(), orderType)) {
// packAmount = shoppingCartInfoDto.getPackAmount();
// }
// Long couponAmount = 0L;
// if (couponBean != null && couponBean.getDiscountAmount() != null) {
// couponAmount = Long.valueOf(couponBean.getDiscountAmount());
// }
// if (promotionAmount == null) {
// promotionAmount = 0L;
// }
// calculationDiscountGoods.setOriginalPrice(amount + packAmount - couponAmount - promotionAmount);
// goods.add(calculationDiscountGoods);
// result.setGoods(goods);
// return result;
// }
public PremiumExchangeResponseVo convert2PremiumExchange(CalculationDiscountResult calculationDiscountResult) {
// 返回构造对象
......
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