Commit 83843d32 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://39.100.92.250:5000/moa/amos-boot-biz into develop_tzs_register
parents 84900566 06778e93
package com.yeejoin.amos.boot.module.tcm.biz.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.ThreadPoolExecutor;
@Configuration
public class ExecuteThreadPoolConfig {
private static final Integer CORE_POOL_SIZE = Runtime.getRuntime().availableProcessors() + 1;
private static final Integer MAX_POOL_SIZE = Runtime.getRuntime().availableProcessors() * 2 + 1;
private static final Integer TASK_QUEUE_CAPACITY = Runtime.getRuntime().availableProcessors();
private static final Integer TASK_KEEP_ALIVE_TIME = 60 * 3;
@Bean(name = "tcmTaskExecutor")
public ThreadPoolTaskExecutor executeThreadPoolConfig() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(CORE_POOL_SIZE);
executor.setMaxPoolSize(MAX_POOL_SIZE);
executor.setQueueCapacity(TASK_QUEUE_CAPACITY);
executor.setThreadNamePrefix("tcmTaskExecutor-");
// 设置线程保持活跃的时间(默认:60 * 3)
executor.setKeepAliveSeconds(TASK_KEEP_ALIVE_TIME);
// 设置任务拒绝策略 通过主线程知行
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
executor.initialize();
return executor;
}
}
......@@ -819,7 +819,9 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
String adminUserId = userResult.getResult().getUserId();
// 省内充装单位1231:生成对接数据账号
if (Arrays.asList(units).contains(FILLING_UNIT_TYPE) && (ValidationUtil.isEmpty(regUnitInfo.getIsNationwide()) || "0".equals(regUnitInfo.getIsNationwide()))) {
// if (Arrays.asList(units).contains(FILLING_UNIT_TYPE) && (ValidationUtil.isEmpty(regUnitInfo.getIsNationwide()) || "0".equals(regUnitInfo.getIsNationwide()))) {
// 20250701 改为全部企业类型生成对接数据账号@tianbo
if (ValidationUtil.isEmpty(regUnitInfo.getIsNationwide()) || "0".equals(regUnitInfo.getIsNationwide())) {
AgencyUserModel shadowUser = new AgencyUserModel();
shadowUser.setUserId(adminUserId);
String appId = DesUtil.encode(adminUserId, SECRETKEY);
......
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