@@ -126,6 +126,7 @@ public class TenantServiceImpl implements TenantService { | |||
log.info("租户项目表添加完毕"); | |||
StringBuilder PlatformName = new StringBuilder(); | |||
log.info(JSONUtil.toJsonStr(createClientTenantDto.getClientRoleDtoList())); | |||
for (ClientRoleDto clientRoleDto : createClientTenantDto.getClientRoleDtoList()) { | |||
//获取clientId查询对应平台获取平台名称 | |||
Platform platform = platformMapper.selectOne(Wrappers.<Platform>lambdaQuery() | |||
@@ -565,7 +566,7 @@ public class TenantServiceImpl implements TenantService { | |||
List<ClientRoleDto> list = dto.getClientRoleDtoList(); | |||
//新增租户关联业务服务实例相关 | |||
StringBuilder PlatformName = new StringBuilder(); | |||
log.info(dto.getClientRoleDtoList().toString()); | |||
for (ClientRoleDto clientRoleDto : list) { | |||
//获取clientId查询对应平台获取平台名称 | |||
Platform platform = platformMapper.selectOne(Wrappers.<Platform>lambdaQuery() | |||
@@ -579,7 +580,9 @@ public class TenantServiceImpl implements TenantService { | |||
TenantEmploy tenantEmploy = new TenantEmploy(); | |||
tenantEmploy.setTenantId(dto.getId()); | |||
tenantEmploy.setPlatformCode(clientRoleDto.getClientId()); | |||
tenantEmploy.setServiceId(clientRoleDto.getServiceId()); | |||
if (ObjectUtil.isNotEmpty(clientRoleDto.getServiceId())) { | |||
tenantEmploy.setServiceId(clientRoleDto.getServiceId()); | |||
} | |||
tenantEmployMapper.insert(tenantEmploy); | |||
} | |||
//拼接 |
@@ -1,76 +0,0 @@ | |||
spring: | |||
# 注册中心consul地址 | |||
cloud: | |||
consul: | |||
host: 192.168.11.13 # consul 所在服务地址 | |||
port: 8500 # consul 服务端口 | |||
discovery: | |||
## consul ip地址 | |||
hostname: 192.168.11.13 | |||
# 注册到consul的服务名称 | |||
service-name: ${spring.application.name} # 服务提供者名称 | |||
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} #实例ID | |||
heartbeat: | |||
enabled: true | |||
prefer-ip-address: true | |||
health-check-path: /actuator/health #健康检查 | |||
health-check-interval: 10s | |||
# 配置数据源 | |||
datasource: | |||
# 使用阿里的Druid连接池 | |||
type: com.alibaba.druid.pool.DruidDataSource | |||
driver-class-name: com.mysql.cj.jdbc.Driver | |||
# 填写你数据库的url、登录名、密码和数据库名 | |||
url: jdbc:mysql://192.168.11.13:3306/tuoheng_oidc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false | |||
username: root | |||
password: idontcare | |||
druid: | |||
# 连接池的配置信息 | |||
# 初始连接数 | |||
initialSize: 5 | |||
# 最小连接池数量 | |||
minIdle: 5 | |||
# 最大连接池数量 | |||
maxActive: 20 | |||
# 配置获取连接等待超时的时间 | |||
maxWait: 60000 | |||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |||
timeBetweenEvictionRunsMillis: 60000 | |||
# 配置一个连接在池中最小生存的时间,单位是毫秒 | |||
minEvictableIdleTimeMillis: 300000 | |||
# 配置一个连接在池中最大生存的时间,单位是毫秒 | |||
maxEvictableIdleTimeMillis: 900000 | |||
# 配置检测连接是否有效 | |||
validationQuery: SELECT 1 FROM DUAL | |||
testWhileIdle: true | |||
testOnBorrow: false | |||
testOnReturn: false | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 | |||
database: 0 | |||
# Redis服务器地址 | |||
host: 192.168.11.13 | |||
# Redis服务器连接端口 | |||
port: 6379 | |||
# Redis服务器连接密码(默认为空) | |||
password: | |||
# 连接超时时间(毫秒) | |||
timeout: 6000 | |||
# 默认的数据过期时间,主要用于shiro权限管理 | |||
expire: 2592000 | |||
jedis: | |||
pool: | |||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) | |||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) | |||
max-idle: 10 # 连接池中的最大空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
# 自定义配置 | |||
tuoheng: | |||
#airport配置地址 | |||
airport-url: https://airport-test.t-aaron.com | |||
#dsp配置地址 | |||
dsp-url: http://106.15.64.139:7011/api/web/dsp | |||
# 高德Key | |||
gaodeKey: 5a1f63e7563cba471a9d0773e218144a |
@@ -2,11 +2,11 @@ spring: | |||
# 注册中心consul地址 | |||
cloud: | |||
consul: | |||
host: 172.15.1.11 # consul 所在服务地址 | |||
host: 106.15.64.139 # consul 所在服务地址 | |||
port: 8500 # consul 服务端口 | |||
discovery: | |||
## consul ip地址 | |||
hostname: 172.15.1.11 | |||
hostname: 106.15.64.139 | |||
# 注册到consul的服务名称 | |||
service-name: ${spring.application.name} # 服务提供者名称 | |||
instance-id: ${spring.application.name}:${spring.cloud.client.ip-address}:${server.port} #实例ID | |||
@@ -21,7 +21,7 @@ spring: | |||
type: com.alibaba.druid.pool.DruidDataSource | |||
driver-class-name: com.mysql.cj.jdbc.Driver | |||
# 填写你数据库的url、登录名、密码和数据库名 | |||
url: jdbc:mysql://rm-uf6z740323e8053pj.mysql.rds.aliyuncs.com:3306/tuoheng_oidc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false | |||
url: jdbc:mysql://rm-uf6z740323e8053pj4o.mysql.rds.aliyuncs.com:3306/tuoheng_oidc?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false | |||
username: root | |||
password: TH22#2022 | |||
druid: |
@@ -3,7 +3,7 @@ server: | |||
spring: | |||
profiles: | |||
active: dev | |||
active: test | |||
application: | |||
name: tuoheng-oidc-admin | |||
main: |