From 8c47fb10090e67a9fe91323443cf7992a2aa91fd Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 20 Sep 2022 13:27:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?crm=20=E4=B9=9F=E6=B2=A1=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oper-crm-server/src/main/resources/bootstrap.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml index 15bb6eb0be..2a80f08229 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-crm/oper-crm-server/src/main/resources/bootstrap.yml @@ -118,6 +118,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -148,4 +154,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ From 8e4461a8bf07da35abf4793012188d6687c37f9c Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 20 Sep 2022 13:32:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fegin=E6=B2=A1=E6=9C=89=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E6=B1=A0=E7=9A=84=20=E9=85=8D=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet-admin-server/src/main/resources/bootstrap.yml | 8 +++++++- epmet-gateway/src/main/resources/bootstrap.yml | 6 ++++++ .../src/main/resources/bootstrap.yml | 7 +++++++ .../data-report-server/src/main/resources/bootstrap.yml | 6 ++++++ .../src/main/resources/bootstrap.yml | 6 ++++++ .../src/main/resources/bootstrap.yml | 6 ++++++ .../epmet-job-server/src/main/resources/bootstrap.yml | 6 ++++++ .../epmet-oss-server/src/main/resources/bootstrap.yml | 6 ++++++ .../epmet-point-server/src/main/resources/bootstrap.yml | 8 +++++++- .../gov-grid-server/src/main/resources/bootstrap.yml | 6 ++++++ .../gov-issue-server/src/main/resources/bootstrap.yml | 6 ++++++ .../gov-mine-server/src/main/resources/bootstrap.yml | 6 ++++++ .../gov-project-server/src/main/resources/bootstrap.yml | 6 ++++++ .../gov-voice-server/src/main/resources/bootstrap.yml | 6 ++++++ .../oper-access-server/src/main/resources/bootstrap.yml | 8 +++++++- .../src/main/resources/bootstrap.yml | 8 +++++++- .../resi-group-server/src/main/resources/bootstrap.yml | 6 ++++++ .../resi-guide-server/src/main/resources/bootstrap.yml | 8 +++++++- .../resi-mine-server/src/main/resources/bootstrap.yml | 8 +++++++- .../src/main/resources/bootstrap.yml | 8 +++++++- .../resi-voice-server/src/main/resources/bootstrap.yml | 8 +++++++- .../epmet-openapi-scan/src/main/resources/bootstrap.yml | 6 ++++++ 22 files changed, 141 insertions(+), 8 deletions(-) diff --git a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml index 80503e260f..2dc9c48f7a 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml +++ b/epmet-admin/epmet-admin-server/src/main/resources/bootstrap.yml @@ -126,6 +126,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -150,4 +156,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index b0b2492d33..e036f7e3c4 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -463,6 +463,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml index 0237f7f5d7..0620c8bcae 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/bootstrap.yml @@ -183,6 +183,13 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 + ribbon: ReadTimeout: 300000 diff --git a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml index 8f7e9c61c4..8d49d4f018 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-report/data-report-server/src/main/resources/bootstrap.yml @@ -130,6 +130,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml index ed65817966..9761f39b51 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/bootstrap.yml @@ -112,6 +112,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml index 1900bf9009..c5710f74e0 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-common-service/common-service-server/src/main/resources/bootstrap.yml @@ -112,6 +112,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml index e0cbb99af4..33417bb1ae 100644 --- a/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-job/epmet-job-server/src/main/resources/bootstrap.yml @@ -117,6 +117,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 600000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 600000 diff --git a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml index 334e1e5629..535b0ad488 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/src/main/resources/bootstrap.yml @@ -123,6 +123,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml index b3fa3f8fe9..4e607d1a33 100644 --- a/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-point/epmet-point-server/src/main/resources/bootstrap.yml @@ -112,6 +112,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -147,4 +153,4 @@ shutdown: rocketmq: enable: @rocketmq.enable@ - name-server: @rocketmq.nameserver@ \ No newline at end of file + name-server: @rocketmq.nameserver@ diff --git a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml index f9d8a3caa6..6689399f22 100644 --- a/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-grid/gov-grid-server/src/main/resources/bootstrap.yml @@ -69,6 +69,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml index 06332fbf9b..85f96591e7 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/bootstrap.yml @@ -110,6 +110,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml index 88eabe8772..35cbd142d4 100644 --- a/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-mine/gov-mine-server/src/main/resources/bootstrap.yml @@ -93,6 +93,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml b/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml index 22a2f25dc9..4a4950cdb7 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml @@ -110,6 +110,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml index 352c1d59e4..a8837135cf 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-voice/gov-voice-server/src/main/resources/bootstrap.yml @@ -101,6 +101,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml index 9ed804a4a3..095294a0ff 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-access/oper-access-server/src/main/resources/bootstrap.yml @@ -112,6 +112,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -142,4 +148,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml index 346506fb54..20379354b7 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/bootstrap.yml @@ -112,6 +112,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -146,4 +152,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml index b782d086dc..94a4a9a021 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/bootstrap.yml @@ -121,6 +121,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml index c8bfca6ee6..13d6c0dc98 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-guide/resi-guide-server/src/main/resources/bootstrap.yml @@ -113,6 +113,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -143,4 +149,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml index 60f5366ff8..64f4b88a53 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-mine/resi-mine-server/src/main/resources/bootstrap.yml @@ -96,6 +96,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -121,4 +127,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml index 751620e91d..38ef749ce5 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/resources/bootstrap.yml @@ -112,6 +112,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -147,4 +153,4 @@ thread: # rocketmq rocketmq: enable: @rocketmq.enable@ - name-server: @rocketmq.nameserver@ \ No newline at end of file + name-server: @rocketmq.nameserver@ diff --git a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml index dc2eaa3898..8753cd0e38 100644 --- a/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml +++ b/epmet-module/resi-voice/resi-voice-server/src/main/resources/bootstrap.yml @@ -64,6 +64,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 @@ -89,4 +95,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml index 108c714da6..3245dae039 100644 --- a/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml +++ b/epmet-openapi/epmet-openapi-scan/src/main/resources/bootstrap.yml @@ -68,6 +68,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 200 ribbon: ReadTimeout: 300000 From 98b22ff8c45dd22486f0c4f1f08bae1fab1f8132 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 20 Sep 2022 14:31:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=99=BB=E9=99=86=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98=E5=92=8C=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E6=B1=A0=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CustomerAgencyServiceImpl.java | 21 +++++++++++++++++-- .../service/impl/CustomerServiceImpl.java | 20 ++++++++++++++++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 760f9690ad..3ee1bc565e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -66,6 +66,9 @@ import org.springframework.transaction.annotation.Transactional; import java.lang.reflect.Field; import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; @@ -112,6 +115,8 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl(); } - List list = baseDao.selectStaffOrgList(staffOrgsFormDTO.getCustomerIdList()); + CompletableFuture> listFuture = CompletableFuture.supplyAsync(()-> baseDao.selectStaffOrgList(staffOrgsFormDTO.getCustomerIdList()),executorService); + //List list = baseDao.selectStaffOrgList(staffOrgsFormDTO.getCustomerIdList()); + CustomerFormDTO customerFormDTO = new CustomerFormDTO(); customerFormDTO.setCustomerIdList(staffOrgsFormDTO.getCustomerIdList()); - Result> customerDTOResult = operCrmFeignClient.queryCustomerList(customerFormDTO); + CompletableFuture>> customerDTOResultFuture = CompletableFuture.supplyAsync(()-> operCrmFeignClient.queryCustomerList(customerFormDTO),executorService); + //Result> customerDTOResult = operCrmFeignClient.queryCustomerList(customerFormDTO); + List list = null; + Result> customerDTOResult = null; + try { + list = listFuture.get(10, TimeUnit.SECONDS); + customerDTOResult = customerDTOResultFuture.get(10, TimeUnit.SECONDS); + } catch (Exception e) { + log.error("getStaffOrgList exception",e); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); + } List customerDTOList = customerDTOResult.getData(); if (customerDTOResult.success() && customerDTOList.size() > 0) { for (CustomerDTO customer : customerDTOList) { diff --git a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java index 856a72c96d..fb26af5f00 100644 --- a/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java +++ b/epmet-module/oper-crm/oper-crm-server/src/main/java/com/epmet/service/impl/CustomerServiceImpl.java @@ -229,8 +229,24 @@ public class CustomerServiceImpl extends BaseServiceImpl> queryCustomerList(CustomerFormDTO formDTO) { - List customerDTOList = baseDao.selectListByIds(formDTO.getCustomerIdList()); - return new Result>().ok(customerDTOList); + List result = new ArrayList<>(); + if(formDTO.getCustomerIdList() != null){ + for (String customerId : formDTO.getCustomerIdList()) { + //先从缓存取 取不到从数据库取 + CustomerDTO customerDTO = customerRedis.queryCustomerInfo(customerId); + if (customerDTO == null) { + CustomerEntity customerEntity = baseDao.selectById(customerId); + if (customerEntity != null) { + customerDTO = ConvertUtils.sourceToTarget(customerEntity, CustomerDTO.class); + } + } + if (customerDTO != null) { + result.add(customerDTO); + } + } + //List customerDTOList = baseDao.selectListByIds(formDTO.getCustomerIdList()); + } + return new Result>().ok(result); } @Override