Commit 9cfd5745 by 黄兆良

public final static boolean printDebug = true;

parent 1bd17173
......@@ -25,7 +25,4 @@ public class ApplicationConstant {
public final static String DELIVERY_DISCOUNT_DESC3="另需配送费%s元";
public final static String DELIVERY_DISCOUNT_DESC4=" 选择了配送券";
@Value("${print-debug-log:false}")
public final static boolean printDebug = true;
}
......@@ -249,9 +249,7 @@ public class PlatformApportionService extends AbstractApportionService {
//ApiLog.info("批量使用优惠券前,oldCoupons,coupons",oldCoupons,coupons);
if(ApplicationConstant.printDebug){
ApiLog.printLog("批量使用优惠券前,oldCoupons,coupons", JSON.toJSONString(oldCoupons),JSON.toJSONString(coupons),null);
}
for(int i = 0 ; i < oldCoupons.size() ; i++){
GetCalculationDiscountBO.CalculationDiscountCoupon oldCoupon = oldCoupons.get(i);
oldCoupon.setUseIndex(i);
......
......@@ -143,9 +143,7 @@ public class GradDeliveryServiceImpl extends AbstractDeliveryServiceImpl impleme
request.setStoreCode(storeCode);
StoreCBaseResponse<StoreCBaseResponseDto> responseDto = storeBaseApiClient.queryDeliverDetail(request);
//ApiLog.info("fisherman 获取门店预计送达时间",request,responseDto);
if(ApplicationConstant.printDebug){
ApiLog.printLog("fisherman 获取门店预计送达时间", JSON.toJSONString(request),JSON.toJSONString(responseDto),null);
}
if (responseDto == null) {
throw new ServiceException(ResponseResult.SYSTEM_BUSINESS_ERROR);
}
......
......@@ -83,9 +83,7 @@ public class AssortmentSdkService {
BaseResponse<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods> baseResponse = shoppingCartService.getCartGoods(cartParamDto, LogThreadLocal.getTrackingNo());
if (baseResponse == null || !ResponseResult.SUCCESS.getCode().equals(baseResponse.getCode()) || baseResponse.getResult() == null) {
/*ErrorLog.printLog(SDKCommonBaseContextWare.getAppName(), LogThreadLocal.getTrackingNo(), getClass(),"getCartGoods:" + JSONObject.toJSONString(baseResponse), cartParamDto, Level.ERROR);*/
if(ApplicationConstant.printDebug){
ApiLog.printLog("getCartGoods:", SDKCommonBaseContextWare.getAppName(),LogThreadLocal.getTrackingNo(),JSONObject.toJSONString(baseResponse));
}
return null;
}
......@@ -326,9 +324,7 @@ public class AssortmentSdkService {
ProductInfosDto productInfosDto = storeItemClient.listProductInfos(getProductInfoDto);
if (!ResponseCodeConstant.RESPONSE_SUCCESS.equals(productInfosDto.getErrcode()) || CollectionUtils.isEmpty(productInfosDto.getData().getProducts())) {
// ApiLog.info("查询商品信息失败,getProductInfoDto,baseResponse",getProductInfoDto,productInfosDto);
if(ApplicationConstant.printDebug){
ApiLog.printLog("查询商品信息失败,getProductInfoDto,baseResponse",JSON.toJSONString(getProductInfoDto),JSON.toJSONString(productInfosDto),null);
}
return null;
}
return productInfosDto.getData().getProducts();
......
......@@ -764,9 +764,7 @@ public class CouponServiceImpl implements CouponService {
@Override
public CheckSpqInfoResponseDto checkSpqInfo(CheckSpqInfoRequestDto requestDto) {
// ApiLog.debug("checkSpqInfo****" + gson.toJson(requestDto));
if(ApplicationConstant.printDebug){
ApiLog.printLog("checkSpqInfo****",gson.toJson(requestDto),null,null);
}
String partnerId = requestDto.getPartnerId();
String couponCode = requestDto.getCouponCode();
String storeId = requestDto.getStoreId();
......@@ -841,9 +839,7 @@ public class CouponServiceImpl implements CouponService {
dto.setPicture(productsVo.getSpuPicture());
dto.setCouponType(0);
// ApiLog.debug("dto***" + dto);
if(ApplicationConstant.printDebug){
ApiLog.printLog("dto***", JSON.toJSONString(dto),null,null);
}
return dto;
}
......
......@@ -86,14 +86,10 @@ public class MaterialPromotionService implements IPromotionService {
public void updateShoppingCartGoodsApportion(ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo, ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult, ShoppingCartGoodsDto shoppingCartGoodsDto, CreateOrderVo.PremiumExchangeActivity premiumExchangeActivity, ShoppingCartInfoRequestVo shoppingCartInfoRequestVo) {
HashMap<String, MaterialApportion> map = getApportionGoodsDetail(calculationDiscountResult);
// ApiLog.debug("updateShoppingCartGoodsApportion->map:" + map);
if(ApplicationConstant.printDebug){
ApiLog.printLog("updateShoppingCartGoodsApportion->map:", JSON.toJSONString(map),null,null);
}
List<ShoppingCartGoodsDto.CartGoodsDetailDto> products = shoppingCartGoodsDto.getProducts();
// ApiLog.debug("updateShoppingCartGoodsApportion->product:" + products);
if(ApplicationConstant.printDebug){
ApiLog.printLog("updateShoppingCartGoodsApportion->product:", JSON.toJSONString(products),null,null);
}
if (map.size() > 0) {
String pk = "";
for (ShoppingCartGoodsDto.CartGoodsDetailDto product : products) {
......
......@@ -241,9 +241,7 @@ public class ShoppingCartCollageServiceImpl extends AbstractShoppingCartImpl imp
List<CollageMemberState> collageMemberState = collageOrderBaseService.getCollageMemberState(collageOrderDto).getResult();
if(collageMemberState == null || collageMemberState.isEmpty()){
// ApiLog.info("splitByUser 参单人员为空,partnerId:{},storeId:{},createUserId:{},currentUserId:{}",partnerId,storeId,createUserId,currentUserId);
if(ApplicationConstant.printDebug){
ApiLog.printLog("splitByUser 参单人员为空,partnerId:{},storeId:{},createUserId:{},currentUserId:{}"+partnerId,storeId,createUserId,currentUserId);
}
return null;
}
......
......@@ -932,9 +932,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
// ApiLog.info("批量使用优惠券前,oldCoupons,coupons",oldCoupons,coupons);
if(ApplicationConstant.printDebug){
ApiLog.printLog("批量使用优惠券前,oldCoupons,coupons", JSON.toJSONString(oldCoupons),JSON.toJSONString(coupons),null);
}
for(int i = 0 ; i < oldCoupons.size() ; i++){
CalculationSharingDiscountRequestDto.CalculationDiscountCoupon oldCoupon = oldCoupons.get(i);
......@@ -961,9 +959,7 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
}
// ApiLog.info("批量使用优惠券后,oldCoupons,coupons",oldCoupons,coupons);
if(ApplicationConstant.printDebug){
ApiLog.printLog("批量使用优惠券后,oldCoupons,coupons", JSON.toJSONString(oldCoupons),JSON.toJSONString(coupons),null);
}
return oldCoupons;
}
......
......@@ -721,9 +721,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, deliveryAmount
, null);
// ApiLog.info("fisherman 新算价 配送费字段数据 01 ",calculationSharingDiscountResult,shoppingCartGoodsResponseVo);
if(ApplicationConstant.printDebug){
ApiLog.printLog("批量使用优惠券前,oldCoupons,coupons", JSON.toJSONString(calculationSharingDiscountResult),JSON.toJSONString(shoppingCartGoodsResponseVo),null);
}
ApiLog.printLog("fisherman 新算价 配送费字段数据 01 ", JSON.toJSONString(calculationSharingDiscountResult),JSON.toJSONString(shoppingCartGoodsResponseVo),null);
sharingCartService.distribute(calculationSharingDiscountResult
, cartGoodsList
, shoppingCartGoodsResponseVo
......@@ -739,9 +737,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
, userId
, storeId);
// ApiLog.info("fisherman 新算价 配送费字段数据 02 ",null,shoppingCartGoodsResponseVo);shoppingCartGoodsResponseVo
if(ApplicationConstant.printDebug){
ApiLog.printLog("fisherman 新算价 配送费字段数据 02 ",JSON.toJSONString(shoppingCartGoodsResponseVo), null,null);
}
buildShoppingCartGoodsResponse(shoppingCartGoodsResponseVo,calculationSharingDiscountResult,shoppingCartInfoRequestVo.getFlag(),partnerId);
}
else {
......@@ -825,9 +821,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
// 添加购物车商品总价和加价购商品总价,现在是自己计算,后面需要优化为促销计算, 这段要删除
// ApiLog.info("fisherman 新算价 校验入参券是否可用new ",shoppingCartGoodsResponseVo,shoppingCartInfoRequestVo.getCouponCodes());
if(ApplicationConstant.printDebug){
ApiLog.printLog("校验入参券是否可用",JSON.toJSONString(shoppingCartGoodsResponseVo),shoppingCartInfoRequestVo.getCouponCode(),null);
}
// 校验入参券是否可用
if (!checkAvailableCoupon(shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getCouponCode())){
return ResponseUtil.error(ResponseResult.SHOPPING_CART_COUPON_NOT_USE);
......@@ -1495,9 +1489,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
try {
// ApiLog.debug("activityClient discount :{}", JSON.toJSONString(activityCalculationDiscountRequestDto));
if(ApplicationConstant.printDebug){
ApiLog.printLog("activityClient discount :{}", JSON.toJSONString(activityCalculationDiscountRequestDto),null,null);
}
activityCalculationDiscountResponseDto = activityClient.calculationDiscount(activityCalculationDiscountRequestDto);
} catch (Exception ex) {
ErrorLog.printErrorLog("calculation_discount_error", "/calculation/discount", activityCalculationDiscountRequestDto, ex);
......@@ -2482,9 +2474,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return deliveryAmount;
}
// ApiLog.debug("获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}", LogThreadLocal.getTrackingNo(), storeDeliveryUseOld, receiveId, partnerId, storeId);
if(ApplicationConstant.printDebug){
ApiLog.printLog("获取配送配逻辑 tackingNo:{},storeDeliveryUseOld:{},receiveId:{},partnerId:{},storeId:{}", LogThreadLocal.getTrackingNo(),JSON.toJSONString(storeDeliveryUseOld),"receiveId:"+receiveId+",partnerId:"+partnerId+",storeId:"+storeId);
}
if (storeDeliveryUseOld) {
deliveryAmount = Long.parseLong(getDeliveryAmount(receiveId, partnerId, storeId).toString());
shoppingCartGoodsResponseVo.setDeliveryFeeZeroReason(0);
......@@ -2835,9 +2825,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
// ApiLog.info("批量使用优惠券前,oldCoupons,coupons",oldCoupons,coupons);
if(ApplicationConstant.printDebug){
ApiLog.printLog("批量使用优惠券前,oldCoupons,coupons", JSON.toJSONString(oldCoupons),JSON.toJSONString(coupons),null);
}
for(int i = 0 ; i < oldCoupons.size() ; i++){
CalculationSharingDiscountRequestDto.CalculationDiscountCoupon oldCoupon = oldCoupons.get(i);
......@@ -2864,9 +2852,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
// ApiLog.info("批量使用优惠券后,oldCoupons,coupons",oldCoupons,coupons);
if(ApplicationConstant.printDebug){
ApiLog.printLog("批量使用优惠券后,oldCoupons,coupons", JSON.toJSONString(oldCoupons),JSON.toJSONString(coupons),null);
}
return oldCoupons;
}
......
......@@ -72,9 +72,7 @@ public class CalculationCommonService {
* 使用促销算价赋值行记录
*/
// ApiLog.debug("initShoppingCart={},discountResult={}", JSON.toJSON(cartGoodsList),JSON.toJSON(discountResult));
if(ApplicationConstant.printDebug){
ApiLog.printLog("initShoppingCart={},discountResult={}",JSON.toJSONString(cartGoodsList),JSON.toJSONString(discountResult),null);
}
List<CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods> goods = null;
if (discountResult != null && CollectionUtils.isNotEmpty(discountResult.getGoods())) {
goods = discountResult.getGoods();
......@@ -223,9 +221,7 @@ public class CalculationCommonService {
, CartGoods cartGoods
, String partnerId) {
// ApiLog.debug("convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}", calculationGoods, cartGoods);
if(ApplicationConstant.printDebug){
ApiLog.printLog("convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}", JSON.toJSONString(calculationGoods), JSON.toJSONString(cartGoods),null);
}
ShoppingCartGoodsDto.CartGoodsDetailDto cartGoodsDetailDto = this.convertCartGoods2DetailGoods(calculationGoods, cartGoods,partnerId);
return cartGoodsDetailDto;
}
......@@ -240,9 +236,7 @@ public class CalculationCommonService {
public ShoppingCartApportionBO.CartGoodsDetailDto convertCartGoods2NewDetailGoodsList(CalculationDiscountBO.CalculationDiscountResult.Goods calculationGoods
, CartGoods cartGoods, String partnerId) {
// ApiLog.debug("convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}", calculationGoods, cartGoods);
if(ApplicationConstant.printDebug){
ApiLog.printLog("convertCartGoods2DetailGoodsList ->calculationGoods:{},cartGoods:{}", JSON.toJSONString(calculationGoods), JSON.toJSONString(cartGoods),null);
}
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods oldGoods = mapperFacade.map(calculationGoods, CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.class);
......
......@@ -104,16 +104,12 @@ public class CalculationSharingDiscountService {
if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
checkSpqInfo = couponService.checkSpqInfo(checkSpqInfoRequestDto, cartGoods.getSkuId());
// ApiLog.debug("coupon:{},{}", "hg", JSON.toJSONString(checkSpqInfo));
if(ApplicationConstant.printDebug){
ApiLog.printLog("coupon:{},{}", "hg", JSON.toJSONString(checkSpqInfo),null);
}
} else {
checkSpqInfo = couponService.checkSpqInfo(checkSpqInfoRequestDto);
// ApiLog.debug("coupon:{},{}", "sp", JSON.toJSONString(checkSpqInfo));
if(ApplicationConstant.printDebug){
ApiLog.printLog("coupon:{},{}", "sp", JSON.toJSONString(checkSpqInfo),null);
}
}
if (null == checkSpqInfo) {
cartGoodsList.remove(i);
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService);
......@@ -188,9 +184,7 @@ public class CalculationSharingDiscountService {
calculationDiscountGoodsList.removeIf(v->v.getGoodsQuantity().equals(0));
if (CollectionUtils.isEmpty(calculationDiscountGoodsList)) {
// ApiLog.debug("calculationDiscountGoodsList:{}", JSON.toJSON(calculationDiscountGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("calculationDiscountGoodsList:{}", JSON.toJSONString(calculationDiscountGoodsList),null,null);
}
//throw new BizServiceException(ResponseResult.SHOPPING_CART_COUPON_NOT_EXIST,"参数促销计算商品有异常");
return null;
}
......
......@@ -256,9 +256,7 @@ public class AdditionSharingService {
throw new ServiceException(ResponseResult.PREMIUM_EXCHANGE_ACTIVITY_NOT_EXIST);
}
//ApiLog.debug("getProductsVoMap:{}", JSON.toJSONString(getProductsVoMap));
if(ApplicationConstant.printDebug){
ApiLog.printLog("getProductsVoMap:{}", JSON.toJSONString(getProductsVoMap),null,null);
}
// 获取计算返回的价格
Long originalTotalAmount = shoppingCartGoodsResponseVo.getOriginalTotalAmount();
//Long totalAmount = shoppingCartGoodsDto.getTotalAmount();
......
......@@ -238,9 +238,7 @@ public class ShoppingCartMCoffeeServiceImpl {
List<CartGoods> newCartGoods = null;
// ApiLog.debug("【oldGoodsList】:{} ,【addCartGoods】:{}",JSONObject.toJSONString(oldCartGoodsList),JSONObject.toJSONString(addCartGoods));
if(ApplicationConstant.printDebug){
ApiLog.printLog("【oldGoodsList】:{} ,【addCartGoods】:{}",JSONObject.toJSONString(oldCartGoodsList),JSONObject.toJSONString(addCartGoods),null);
}
if(StringUtils.equals("9999",skuId)) {
// 将月享卡2.0的虚拟商品保存到购物车中
oldCartGoodsList.add(addCartGoods);
......@@ -803,11 +801,9 @@ public class ShoppingCartMCoffeeServiceImpl {
if (null != cartGoods.getMonthCardInfo()){
cartGoods.getMonthCardInfo().setIsUseMonthCard(requestVo.getIsUseMonthCard());
//ApiLog.info("【清除券信息】是否使用月享卡优惠:{},月享卡实体:{}",requestVo.getIsUseMonthCard(),JSONObject.toJSONString(cartGoods));
if(ApplicationConstant.printDebug){
ApiLog.printLog("【清除券信息】是否使用月享卡优惠:{},月享卡实体:{}",String.valueOf(requestVo.getIsUseMonthCard()),JSONObject.toJSONString(cartGoods),null);
}
}
}
cartGoodsList = cartGoodsList.stream().filter(cartGoods -> !StringUtils.equals("9999",cartGoods.getSkuId())).collect(Collectors.toList());
//重新保存购物车
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService);
......@@ -841,15 +837,11 @@ public class ShoppingCartMCoffeeServiceImpl {
// 先验证商品是否存在
List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, null, null, shoppingCartBaseService);
//ApiLog.debug("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("cartGoodsList: {}", JSONObject.toJSONString(cartGoodsList),null,null);
}
List<CartGoods> cartSendGoodsList = assortmentSdkService.getShoppingCartSendGoods(partnerId, storeId, userId, sessionId, "", shoppingCartBaseService);
//ApiLog.debug("cartSendGoodsList: {}",JSONObject.toJSONString(cartSendGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("cartGoodsList: {}", JSONObject.toJSONString(cartSendGoodsList),null,null);
}
CartGoods cartGoods = null;
String skuId = "";
Integer finalQty = qty;
......@@ -1018,15 +1010,11 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取购物车商品
List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, sessionId, "", shoppingCartBaseService);
// ApiLog.debug("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("cartGoodsList: {}", JSONObject.toJSONString(cartGoodsList),null,null);
}
List<CartGoods> cartSendGoodsList = assortmentSdkService.getShoppingCartSendGoods(partnerId, storeId, userId, sessionId, "", shoppingCartBaseService);
// ApiLog.debug("cartSendGoodsList: {}",JSONObject.toJSONString(cartSendGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("cartSendGoodsList: {}", JSONObject.toJSONString(cartSendGoodsList),null,null);
}
CartGoods monthCardProduct = null;
// 如果购物车商品不为空, 则check购物车中所有商品
if (CollectionUtils.isNotEmpty(cartGoodsList)) {
......@@ -1295,14 +1283,10 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取购物车商品
List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, null, tableNumber, shoppingCartBaseService);
//ApiLog.debug("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList),null,null);
}
List<CartGoods> cartSendGoodsList = assortmentSdkService.getShoppingCartSendGoods(partnerId, storeId, userId, null, tableNumber, shoppingCartBaseService);
//ApiLog.debug("cartSendGoodsList: {}",JSONObject.toJSONString(cartSendGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("cartSendGoodsList: {}",JSONObject.toJSONString(cartSendGoodsList),null,null);
}
if (cartGoodsList == null || CollectionUtils.isEmpty(cartGoodsList)) {
throw new ServiceException(ResponseResult.SHOPPING_CART_GETINFO_INVAILD);
}
......@@ -1438,9 +1422,7 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取原门店购物车商品
List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, fromStoreId, userId, sessionId, "", shoppingCartBaseService);
//ApiLog.debug("【switchCardGoods】原门店数据: {} {}", requestVo.getSessionId(), JSONObject.toJSONString(cartGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("【switchCardGoods】原门店数据: {} {}", requestVo.getSessionId(), JSONObject.toJSONString(cartGoodsList),null);
}
// 如果购物车商品不为空, 则check购物车中所有商品
if (CollectionUtils.isEmpty(cartGoodsList)) {
return ResponseUtil.success(shoppingCartGoodsResponseVo);
......@@ -1841,9 +1823,7 @@ public class ShoppingCartMCoffeeServiceImpl {
}
if(CollectionUtils.isNotEmpty(newCartGoodsList)){
//ApiLog.debug("【merge-before】:{} ,【newCardGoods】:{}",JSONObject.toJSONString(nowCartGoodsList),JSONObject.toJSONString(newCartGoods));
if(ApplicationConstant.printDebug){
ApiLog.printLog("【merge-before】:{} ,【newCardGoods】:{}",JSONObject.toJSONString(nowCartGoodsList),JSONObject.toJSONString(newCartGoods),null);
}
newCartGoodsList.forEach(newCartGood -> {
int index;
if ((index = nowCartGoodsList.indexOf(newCartGood)) >= 0) {
......@@ -2738,12 +2718,10 @@ public class ShoppingCartMCoffeeServiceImpl {
cartGoods.getMonthCardInfo().setCardNo(productBindingCouponType.getCardId());
cartGoods.getMonthCardInfo().setType(cartGoods.getMonthCardInfo().getType());
//ApiLog.debug("【月享卡】信息替换成功,cartGoods:{},productInfo:{}",cartGoods.toString(),result.toString());
if(ApplicationConstant.printDebug){
ApiLog.printLog("【月享卡】信息替换成功,cartGoods:{},productInfo:{}",cartGoods.toString(),result.toString(),null);
}
}
}
}
/**
* 种子加购逻辑校验
......
......@@ -197,9 +197,7 @@ public class CouponDiscountCalculation {
if (CollectionUtils.isNotEmpty(discountsNew)) {
useCoupon = true;
// ApiLog.debug("couponDiscountCalculation:{}",discountsNew);
if(ApplicationConstant.printDebug){
ApiLog.printLog("couponDiscountCalculation:{}",JSON.toJSONString(discountsNew),null,null);
}
//这里过滤掉了 月享卡2.0,因为月享卡2.0商品不用展示划线价,故显示原价
Optional<ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount> targetDiscount = discountsNew.stream()
.filter(t -> ActivityTypeEnum.TYPE_32.getCode().equals(t.getType())
......@@ -286,9 +284,7 @@ public class CouponDiscountCalculation {
changed.set(false);
if(CollectionUtils.isNotEmpty(cartGoodsList)){
// ApiLog.debug("合并买3赠1商品券 【merge-before】 : {} ", JSONObject.toJSONString(nowCartGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("合并买3赠1商品券 【merge-before】 : {} ", JSONObject.toJSONString(nowCartGoodsList),null,null);
}
for (int i = cartGoodsList.size() - 1; i >= 1; i--) {
CartGoods cartGoods = cartGoodsList.get(i);
int index2 = nowCartGoodsList.indexOf(cartGoods);
......@@ -302,15 +298,11 @@ public class CouponDiscountCalculation {
nowCartGoodsList.remove(i);
}
// ApiLog.debug("合并买3赠1商品券 【merge-ing】 : {} ", JSONObject.toJSONString(nowCartGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("合并买3赠1商品券 【merge-ing】 : {} ", JSONObject.toJSONString(nowCartGoodsList),null,null);
}
}
// ApiLog.debug("合并买3赠1商品券 【merge-after】 : {} ", JSONObject.toJSONString(nowCartGoodsList));
if(ApplicationConstant.printDebug){
ApiLog.printLog("合并买3赠1商品券 【merge-after】 : {} ", JSONObject.toJSONString(nowCartGoodsList),null,null);
}
}
if(changed.get()) {
cartGoodsList.clear();
cartGoodsList.addAll(nowCartGoodsList);
......
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