gongfuzhu hai 8 meses
pai
achega
d247a52e7a

+ 1 - 1
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/publish/Video2Publish.java

@@ -66,7 +66,7 @@ public class Video2Publish implements ProductPublish {
                         ProductPushModel.builder()
                                 .regionCode(productTriggerTask.getRegion().getCode())
                                 .pid(String.valueOf(it.getProductId()))
-                                .productType(ProductType.Cinema)
+                                .productType(ProductType.Recharge)
                                 .title(it.getItemName())
                                 .salePrice(multiply.longValue())
                                 .meta(Map.of("goods", it))

+ 6 - 3
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/service/impl/Video2ServiceImpl.java

@@ -66,6 +66,9 @@ public class Video2ServiceImpl implements Video2Service {
 
         RechargeProductResp rechargeProductResp = video2Api.rechargeProduct();
         List<ProductItemResp> collect = rechargeProductResp.getProducts().stream().filter(productItemResp -> productItemResp.getProductId().equals(rechargeOrderReq.getProductId())).collect(Collectors.toList());
+        if (collect.isEmpty()) {
+            return ResultContent.build(ResultState.Fail, "视频会员不存在");
+        }
         ProductItemResp productItemResp = collect.get(0);
         String channelPrice = productItemResp.getChannelPrice();
         BigDecimal totalPrice = new BigDecimal(channelPrice);
@@ -165,9 +168,9 @@ public class Video2ServiceImpl implements Video2Service {
 
         RechargeProductResp rechargeProductResp = video2Api.rechargeProduct();
         List<ProductItemResp> collect = rechargeProductResp.getProducts().stream().filter(productItemResp -> productItemResp.getProductId().equals(rechargeOrderReq.getProductId())).collect(Collectors.toList());
-       if (collect.isEmpty()){
-           return ResultContent.build(ResultState.Fail, "视频会员不存在");
-       }
+        if (collect.isEmpty()) {
+            return ResultContent.build(ResultState.Fail, "视频会员不存在");
+        }
         ProductItemResp productItemResp = collect.get(0);
         BigDecimal totalPrice = BigDecimal.ZERO;
         com.zswl.cloud.shop.client.ret.ResultContent<AccountDetailVo> shopSetting = shopService.shopSetting("视频会员");