Commit 88073db4 by 徐康

商品券白名单

parent 8380af56
......@@ -922,14 +922,24 @@ public class CouponServiceImpl implements CouponService {
if (couponDetailResponseDto == null || !couponDetailResponseDto.getResult().equals(ResponseCodeConstant.RESPONSE_SUCCESS_1) || CollectionUtils.isEmpty(couponDetailResponseDto.getDetails())) {
return null;
}
if (CollectionUtils.isEmpty(couponDetailResponseDto.getDetails())) {
return null;
}
Integer couponType = 0;
//券返回的商品id
String skuId ;
List<String> skuIds = Lists.newArrayList();
String skuId = goodsId;
if (StringUtils.isEmpty(goodsId)) {
if(CouponTypeEnum.TYPE_0.getCode().equals(couponDetailResponseDto.getDetails().get(0).getType())
&& Integer.valueOf(1).equals(couponDetailResponseDto.getDetails().get(0).getSubType())) {
throw new ServiceException(ResponseResult.SHOPPING_CART_PRODUCT_CAN_NOT_USE, "老版本不支持商品券黑名单商品,请升级小程序。");
}
//券返回的商品id
skuId = couponDetailResponseDto.getDetails().get(0).getActiveProduct().get(0).getProductIdPartner();
skuIds.add(String.valueOf(skuId));
}else {
skuId = goodsId;
}
skuIds.add(skuId);
//TODO 通过skuid查询spuid
Map<String, GetProductsVo> productsVoMap = itemService.getProducts(skuIds, partnerId, storeId, requestDto.getMenuType());
......
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