Commit 13f643da by 周晓航

Merge branch '订单C端,校验券状态+有效期-zxh-1039062' into qa

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
parents be0d0f9b 5d4152ec
...@@ -519,29 +519,21 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -519,29 +519,21 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
com.freemud.application.sdk.api.base.BaseResponse<GetProductInfosResponse> productInfosByIds = menuService.getProductInfosByIds(request, trackingNo); com.freemud.application.sdk.api.base.BaseResponse<GetProductInfosResponse> productInfosByIds = menuService.getProductInfosByIds(request, trackingNo);
if (!ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(productInfosByIds.getCode()) || productInfosByIds.getData() == null || CollectionUtils.isEmpty(productInfosByIds.getData().getProducts())) { if (!ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(productInfosByIds.getCode()) || productInfosByIds.getData() == null || CollectionUtils.isEmpty(productInfosByIds.getData().getProducts())) {
return ResponseUtil.error(ResponseResultEnum.GET_PRODUCT_INFOS_ERROR.getCode(), ResponseResultEnum.GET_PRODUCT_INFOS_ERROR.getMessage()); return ResponseUtil.error(ResponseResultEnum.GET_PRODUCT_INFOS_ERROR.getCode(), ResponseResultEnum.GET_PRODUCT_INFOS_ERROR.getMessage());
}*/ }
//查询商品信息sdk改feign
GetProductInfoDto request = new GetProductInfoDto();
request.setPartnerId(partnerId);
request.setShopId(storeId);
request.setProductInfoType(ProductInfoType.ALL.getCode());
request.setProductIds(productIds);
request.setChannel(menuType);
ProductInfosDto productInfos = storeItemClient.listProductInfos(request);
//获取虚拟商品中的券信息
//效验商品券是否有效 //效验商品券是否有效
List<ProductBindingCouponType> productBindingCoupons = productInfos.getData().getProducts().get(0).getProductBindingCouponTypes(); List<ProductBindingCouponType> productBindingCoupons = productInfos.getData().getProducts().get(0).getProductBindingCouponTypes();
if (CollectionUtils.isEmpty(productBindingCoupons)) { if (CollectionUtils.isEmpty(productBindingCoupons)) {
return ResponseUtil.error(ResponseResult.STORE_ITEM_CHECK_INVAILD); return ResponseUtil.error(ResponseResult.STORE_ITEM_CHECK_INVAILD);
} }
List<ProductInfo> products = productInfos.getData().getProducts(); // 产品确认 暂时不需要改逻辑
for (ProductInfo product : products) { // List<GetMenuCategoryInfoResponse.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean> products = productInfosByIds.getData().getProducts();
Integer status = product.getStatus(); //
if (!Objects.equals(status, IntegralProductStatusEnum.STATUS_2.getCode())) { // for (GetMenuCategoryInfoResponse.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean product : products) {
return ResponseUtil.error(ResponseResult.COUPON_INVAILD.getCode(),"您需要购买的券包,包含的优惠券券编号"+skuId+"包含的商品已失效,请联系门店尽快处理"); // Integer status = product.getStatus();
} // if (!Objects.equals(status, IntegralProductStatusEnum.STATUS_2.getCode())) {
} // return ResponseUtil.error(ResponseResult.COUPON_INVAILD.getCode(),"您需要购买的券包,包含的优惠券券编号"+skuId+"包含的商品已失效,请联系门店尽快处理");
// }
// }
List<String> activityCodes = new ArrayList<>(); List<String> activityCodes = new ArrayList<>();
for (ProductBindingCouponType productBindingCouponType : productBindingCoupons) { for (ProductBindingCouponType productBindingCouponType : productBindingCoupons) {
activityCodes.add(productBindingCouponType.getActivityCode()); activityCodes.add(productBindingCouponType.getActivityCode());
......
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