Commit def49998 by 徐康

修复更新优惠问题

parent f68b6578
...@@ -1539,7 +1539,8 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService { ...@@ -1539,7 +1539,8 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
* 随单购月卡调会员发券与更新订单使用的优惠券与买的优惠券 * 随单购月卡调会员发券与更新订单使用的优惠券与买的优惠券
* @param orderBean * @param orderBean
*/ */
private boolean withOrderBuyCoupon(QueryOrdersResponseDto.DataBean.OrderBean orderBean,String thirdPartyMemberId){ private boolean withOrderBuyCoupon(QueryOrdersResponseDto.DataBean.OrderBean orderBean, String thirdPartyMemberId){
LogUtil.info("发券入参:", thirdPartyMemberId, JSON.toJSONString(orderBean));
try{ try{
List<String> cardIds = new ArrayList<>(); List<String> cardIds = new ArrayList<>();
List<String> defaultCardCodes = new ArrayList<>(); List<String> defaultCardCodes = new ArrayList<>();
...@@ -1600,7 +1601,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService { ...@@ -1600,7 +1601,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
req.setPartnerId(orderBean.getCompanyId()); req.setPartnerId(orderBean.getCompanyId());
req.setCouponReceiveInfoList(new ArrayList<>()); req.setCouponReceiveInfoList(new ArrayList<>());
req.setCouponUpdateInfoList(new ArrayList<>()); req.setCouponUpdateInfoList(new ArrayList<>());
log.info("准备开始生成参数:", orderBean); LogUtil.info("准备开始生成参数:", orderBean, null);
for (QueryOrdersResponseDto.DataBean.OrderBean.ProductBean productBean : orderBean.getProductList()) { for (QueryOrdersResponseDto.DataBean.OrderBean.ProductBean productBean : orderBean.getProductList()) {
if(ProductTypeEnum.getVirtualProductType().contains(productBean.getProductType())) { if(ProductTypeEnum.getVirtualProductType().contains(productBean.getProductType())) {
UpdateCouponCodeReq.CouponReceiveInfo couponReceiveInfo = new UpdateCouponCodeReq.CouponReceiveInfo(); UpdateCouponCodeReq.CouponReceiveInfo couponReceiveInfo = new UpdateCouponCodeReq.CouponReceiveInfo();
...@@ -1626,7 +1627,11 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService { ...@@ -1626,7 +1627,11 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
} }
couponReceiveInfo.setCouponCode(cardCodeStr.substring(0, cardCodeStr.length()-1)); couponReceiveInfo.setCouponCode(cardCodeStr.substring(0, cardCodeStr.length()-1));
req.getCouponReceiveInfoList().add(couponReceiveInfo); req.getCouponReceiveInfoList().add(couponReceiveInfo);
} else if(CollectionUtils.isNotEmpty(productBean.getDiscountList())) { }
}
for(QueryOrdersResponseDto.DataBean.OrderBean.ProductBean productBean : orderBean.getProductList()) {
if(CollectionUtils.isNotEmpty(productBean.getDiscountList())) {
for (QueryOrdersResponseDto.DataBean.OrderBean.ProductBean.ProductDiscount discount : productBean.getDiscountList()) { for (QueryOrdersResponseDto.DataBean.OrderBean.ProductBean.ProductDiscount discount : productBean.getDiscountList()) {
if(defaultCardCodes.contains(discount.getDiscountId())) { if(defaultCardCodes.contains(discount.getDiscountId())) {
UpdateCouponCodeReq.CouponUpdateInfo couponUpdateInfo = new UpdateCouponCodeReq.CouponUpdateInfo(); UpdateCouponCodeReq.CouponUpdateInfo couponUpdateInfo = new UpdateCouponCodeReq.CouponUpdateInfo();
...@@ -1653,7 +1658,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService { ...@@ -1653,7 +1658,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
} }
} }
log.info("生成参数完成:", req); LogUtil.info("生成参数完成:", req, null);
orderSdkService.updateCostCouponCode(req, LogTreadLocal.getTrackingNo()); orderSdkService.updateCostCouponCode(req, LogTreadLocal.getTrackingNo());
......
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