diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/commodity/controller/GroupCommodityCodeController.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/commodity/controller/GroupCommodityCodeController.java index a486a7f4..0522be48 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/commodity/controller/GroupCommodityCodeController.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/commodity/controller/GroupCommodityCodeController.java @@ -31,7 +31,6 @@ import javax.annotation.Resource; import java.io.IOException; import java.util.List; import java.util.Map; -import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import java.util.stream.Collectors; @@ -164,20 +163,20 @@ public class GroupCommodityCodeController { reqBO.setUUID(baseService.getGenerateShotKey()); reqBOList.add(reqBO); } - - int index = 0; - List> partition = Lists.partition(reqBOList, 200); - for (List mdmGmfxxtbReqBOS : partition) { - List> completableFutureList = Lists.newArrayList(); - for (MdmGmfxxtbReqBO reqBO : mdmGmfxxtbReqBOS) { - CompletableFuture voidCompletableFuture = CompletableFuture.supplyAsync(()->{ - String str = buyerMessageService(reqBO); - return str; - }, voucherTaskExecutor); - completableFutureList.add(voidCompletableFuture); - } - CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0])).join(); - } + String service = sdEnregyService.syncBuyerMessageService(reqBOList); +// int index = 0; +// List> partition = Lists.partition(reqBOList, 200); +// for (List mdmGmfxxtbReqBOS : partition) { +// List> completableFutureList = Lists.newArrayList(); +// for (MdmGmfxxtbReqBO reqBO : mdmGmfxxtbReqBOS) { +// CompletableFuture voidCompletableFuture = CompletableFuture.supplyAsync(()->{ +// String str = buyerMessageService(reqBO); +// return str; +// }, voucherTaskExecutor); +// completableFutureList.add(voidCompletableFuture); +// } +// CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[0])).join(); +// } return R.ok().put("data",""); } catch (IOException e) { throw new RuntimeException(e); diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java index 00dc696d..3987bf0c 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java @@ -559,7 +559,12 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { @Override public String syncMdmGroupTaxService(List taxxtbReqBOS){ - AjaxResult syncResult = this.syncMdmGroupTax(taxxtbReqBOS,null); + AjaxResult syncResult = null; + try { + syncResult = this.syncMdmGroupTax(taxxtbReqBOS,null); + } catch (Exception e) { + throw new RuntimeException(e); + } if (syncResult.isSuccess()) { return ""; } else { @@ -570,7 +575,12 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { @Override public String syncBuyerMessageService(List mdmGmfxxtbReqBOS){ - AjaxResult syncResult = this.syncBuyerMessage(mdmGmfxxtbReqBOS,null); + AjaxResult syncResult = null; + try { + syncResult = this.syncBuyerMessage(mdmGmfxxtbReqBOS,null); + } catch (Exception e) { + throw new RuntimeException(e); + } if (syncResult.isSuccess()) { return ""; } else { @@ -715,7 +725,12 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { @Override public String syncMdmUserService(List mdmSyncUserReqBO){ - AjaxResult syncResult = this.syncMdmUser(mdmSyncUserReqBO,null); + AjaxResult syncResult = null; + try { + syncResult = this.syncMdmUser(mdmSyncUserReqBO,null); + } catch (Exception e) { + throw new RuntimeException(e); + } if (syncResult.isSuccess()) { return ""; } else {