服务指令镜像bug
This commit is contained in:
parent
e48fc93aaf
commit
064a4e3bcf
|
|
@ -6,4 +6,6 @@ public interface ISysConfigApi {
|
||||||
JSONObject getAll();
|
JSONObject getAll();
|
||||||
|
|
||||||
JSONObject getByKey(String key);
|
JSONObject getByKey(String key);
|
||||||
|
|
||||||
|
JSONObject getByKeyByDS(String ds,String key);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@DS("multi-datasource1")
|
@DS("ope")
|
||||||
public class ServerAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoMapper, NuBizAdvisoryInfo> implements ServerAdvisoryInfoService {
|
public class ServerAdvisoryInfoServiceImpl extends ServiceImpl<NuBizAdvisoryInfoMapper, NuBizAdvisoryInfo> implements ServerAdvisoryInfoService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.nu.modules.sysconfig.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
|
import com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
@ -60,12 +61,25 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject getByKey(String key) {
|
public JSONObject getByKey(String key) {
|
||||||
|
JSONObject result = getJsonObject(key);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DS("#ds")
|
||||||
|
public JSONObject getByKeyByDS(String ds, String key) {
|
||||||
|
JSONObject result = getJsonObject(key);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private JSONObject getJsonObject(String key) {
|
||||||
LambdaQueryWrapper<SysConfig> qw = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysConfig> qw = new LambdaQueryWrapper<>();
|
||||||
qw.eq(SysConfig::getDelFlag, "0");
|
qw.eq(SysConfig::getDelFlag, "0");
|
||||||
qw.eq(SysConfig::getConfigKey,key);
|
qw.eq(SysConfig::getConfigKey, key);
|
||||||
SysConfig sysConfig = baseMapper.selectOne(qw);
|
SysConfig sysConfig = baseMapper.selectOne(qw);
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
if(sysConfig!=null){
|
if (sysConfig != null) {
|
||||||
result.put("id", sysConfig.getId());
|
result.put("id", sysConfig.getId());
|
||||||
result.put("name", sysConfig.getName());
|
result.put("name", sysConfig.getName());
|
||||||
result.put("configKey", sysConfig.getConfigKey());
|
result.put("configKey", sysConfig.getConfigKey());
|
||||||
|
|
@ -80,5 +94,4 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public class NuBaseInfoMQListener {
|
||||||
orgName = deptInfo.getString("name");
|
orgName = deptInfo.getString("name");
|
||||||
List<NuBaseInfo> syncList = ListUtil.of();
|
List<NuBaseInfo> syncList = ListUtil.of();
|
||||||
try {
|
try {
|
||||||
syncList = baseInfoService.getSynchronized("multi-nudevops", orgCode);
|
syncList = baseInfoService.getSynchronized("devops", orgCode);
|
||||||
baseInfoService.batchInsert(syncList);
|
baseInfoService.batchInsert(syncList);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
StatusMQDto statusMQDto = new StatusMQDto();
|
StatusMQDto statusMQDto = new StatusMQDto();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
package org.jeecg.modules.data.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 多数据源管理
|
||||||
|
* @Author: caolei
|
||||||
|
* @Date: 2025-04-01
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DataSourceEntity {
|
||||||
|
|
||||||
|
public DataSourceEntity(String id, String code, String name, String dbType, String dbDriver, String dbUrl, String dbName, String dbUsername, String dbPassword, String sysOrgCode){
|
||||||
|
this.id = id;
|
||||||
|
this.code = code;
|
||||||
|
this.name = name;
|
||||||
|
this.dbType = dbType;
|
||||||
|
this.dbDriver = dbDriver;
|
||||||
|
this.dbUrl = dbUrl;
|
||||||
|
this.dbName = dbName;
|
||||||
|
this.dbUsername = dbUsername;
|
||||||
|
this.dbPassword = dbPassword;
|
||||||
|
this.sysOrgCode = sysOrgCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 数据源编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
/**
|
||||||
|
* 数据源名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 数据库类型
|
||||||
|
*/
|
||||||
|
private String dbType;
|
||||||
|
/**
|
||||||
|
* 驱动类
|
||||||
|
*/
|
||||||
|
private String dbDriver;
|
||||||
|
/**
|
||||||
|
* 数据源地址
|
||||||
|
*/
|
||||||
|
private String dbUrl;
|
||||||
|
/**
|
||||||
|
* 数据库名称
|
||||||
|
*/
|
||||||
|
private String dbName;
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
private String dbUsername;
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
private String dbPassword;
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 所属部门
|
||||||
|
*/
|
||||||
|
private String sysOrgCode;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package org.jeecg.modules.data.loader;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
|
||||||
|
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||||
|
import com.baomidou.dynamic.datasource.creator.druid.DruidDataSourceCreator;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.modules.data.util.SecurityUtil;
|
||||||
|
import org.jeecg.modules.data.entity.DataSourceEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class DataSourceLoader {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DruidDataSourceCreator dataSourceCreator;
|
||||||
|
@Autowired
|
||||||
|
private DataSource dataSource;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
refreshDataSources();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refreshDataSources() {
|
||||||
|
DynamicRoutingDataSource ds = (DynamicRoutingDataSource) dataSource;
|
||||||
|
DataSource mainDataSource = ds.getDataSource("devops");
|
||||||
|
|
||||||
|
// 从主数据源读取配置
|
||||||
|
List<DataSourceEntity> configs = new JdbcTemplate(mainDataSource).query(
|
||||||
|
"SELECT id, code, name, db_type, db_driver, db_url, db_name, db_username ,db_password ,sys_org_code FROM sys_data_source",
|
||||||
|
(rs, rowNum) -> new DataSourceEntity(
|
||||||
|
rs.getString("id"),
|
||||||
|
rs.getString("code"),
|
||||||
|
rs.getString("name"),
|
||||||
|
rs.getString("db_type"),
|
||||||
|
rs.getString("db_driver"),
|
||||||
|
rs.getString("db_url"),
|
||||||
|
rs.getString("db_name"),
|
||||||
|
rs.getString("db_username"),
|
||||||
|
rs.getString("db_password"),
|
||||||
|
rs.getString("sys_org_code")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// 创建并添加数据源
|
||||||
|
configs.forEach(config -> {
|
||||||
|
DataSourceProperty dataSourceProperty = new DataSourceProperty();
|
||||||
|
dataSourceProperty.setUrl(config.getDbUrl());
|
||||||
|
dataSourceProperty.setUsername(config.getDbUsername());
|
||||||
|
String dbPassword = SecurityUtil.jiemi(config.getDbPassword());
|
||||||
|
dataSourceProperty.setPassword(dbPassword);
|
||||||
|
dataSourceProperty.setDriverClassName(config.getDbDriver());
|
||||||
|
DataSource dynamicDataSource = dataSourceCreator.createDataSource(dataSourceProperty);
|
||||||
|
ds.addDataSource(config.getCode(), dynamicDataSource);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package org.jeecg.modules.data.util;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.CharsetUtil;
|
||||||
|
import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
|
||||||
|
import cn.hutool.crypto.symmetric.SymmetricCrypto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 密码加密解密
|
||||||
|
* @author: lsq
|
||||||
|
* @date: 2020年09月07日 14:26
|
||||||
|
*/
|
||||||
|
public class SecurityUtil {
|
||||||
|
/**加密key*/
|
||||||
|
private static String key = "JEECGBOOT1423670";
|
||||||
|
|
||||||
|
//---AES加密---------begin---------
|
||||||
|
/**加密
|
||||||
|
* @param content
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String jiami(String content) {
|
||||||
|
SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, key.getBytes());
|
||||||
|
String encryptResultStr = aes.encryptHex(content);
|
||||||
|
return encryptResultStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**解密
|
||||||
|
* @param encryptResultStr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String jiemi(String encryptResultStr){
|
||||||
|
SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, key.getBytes());
|
||||||
|
//解密为字符串
|
||||||
|
String decryptResult = aes.decryptStr(encryptResultStr, CharsetUtil.CHARSET_UTF_8);
|
||||||
|
return decryptResult;
|
||||||
|
}
|
||||||
|
//---AES加密---------end---------
|
||||||
|
/**
|
||||||
|
* 主函数
|
||||||
|
*/
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String content="test1111";
|
||||||
|
String encrypt = jiami(content);
|
||||||
|
System.out.println(encrypt);
|
||||||
|
//构建
|
||||||
|
String decrypt = jiemi(encrypt);
|
||||||
|
//解密为字符串
|
||||||
|
System.out.println(decrypt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
package com.nu.utils;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class HttpRequestUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建默认的请求头(包含Accept: application/json)
|
||||||
|
* @return 包含默认请求头的Map
|
||||||
|
*/
|
||||||
|
public static Map<String, String> createDefaultHeaders() {
|
||||||
|
Map<String, String> headers = new HashMap<>();
|
||||||
|
headers.put("Accept", "application/json");
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送GET请求
|
||||||
|
*
|
||||||
|
* @param url 请求URL
|
||||||
|
* @param headers 请求头参数,可以为null
|
||||||
|
* @return 响应结果
|
||||||
|
* @throws IOException IO异常
|
||||||
|
*/
|
||||||
|
public static String doGet(String url, Map<String, String> headers) throws IOException {
|
||||||
|
HttpURLConnection connection = null;
|
||||||
|
BufferedReader reader = null;
|
||||||
|
try {
|
||||||
|
URL requestUrl = new URL(url);
|
||||||
|
connection = (HttpURLConnection) requestUrl.openConnection();
|
||||||
|
connection.setRequestMethod("GET");
|
||||||
|
connection.setConnectTimeout(5000);
|
||||||
|
connection.setReadTimeout(5000);
|
||||||
|
|
||||||
|
// 设置请求头
|
||||||
|
if (headers != null && !headers.isEmpty()) {
|
||||||
|
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||||
|
connection.setRequestProperty(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int responseCode = connection.getResponseCode();
|
||||||
|
if (responseCode == HttpURLConnection.HTTP_OK) {
|
||||||
|
reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8));
|
||||||
|
StringBuilder response = new StringBuilder();
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
response.append(line);
|
||||||
|
}
|
||||||
|
return response.toString();
|
||||||
|
} else {
|
||||||
|
throw new IOException("GET request failed with response code: " + responseCode);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (reader != null) {
|
||||||
|
reader.close();
|
||||||
|
}
|
||||||
|
if (connection != null) {
|
||||||
|
connection.disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送POST请求
|
||||||
|
*
|
||||||
|
* @param url 请求URL
|
||||||
|
* @param headers 请求头参数,可以为null
|
||||||
|
* @param body 请求体内容
|
||||||
|
* @return 响应结果
|
||||||
|
* @throws IOException IO异常
|
||||||
|
*/
|
||||||
|
public static String doPost(String url, Map<String, String> headers, String body) throws IOException {
|
||||||
|
HttpURLConnection connection = null;
|
||||||
|
BufferedReader reader = null;
|
||||||
|
OutputStream outputStream = null;
|
||||||
|
try {
|
||||||
|
URL requestUrl = new URL(url);
|
||||||
|
connection = (HttpURLConnection) requestUrl.openConnection();
|
||||||
|
connection.setRequestMethod("POST");
|
||||||
|
connection.setConnectTimeout(5000);
|
||||||
|
connection.setReadTimeout(5000);
|
||||||
|
connection.setDoOutput(true);
|
||||||
|
|
||||||
|
// 设置请求头
|
||||||
|
if (headers != null && !headers.isEmpty()) {
|
||||||
|
for (Map.Entry<String, String> entry : headers.entrySet()) {
|
||||||
|
connection.setRequestProperty(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 写入请求体
|
||||||
|
outputStream = connection.getOutputStream();
|
||||||
|
outputStream.write(body.getBytes(StandardCharsets.UTF_8));
|
||||||
|
outputStream.flush();
|
||||||
|
|
||||||
|
int responseCode = connection.getResponseCode();
|
||||||
|
if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED) {
|
||||||
|
reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8));
|
||||||
|
StringBuilder response = new StringBuilder();
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
response.append(line);
|
||||||
|
}
|
||||||
|
return response.toString();
|
||||||
|
} else {
|
||||||
|
throw new IOException("POST request failed with response code: " + responseCode);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (outputStream != null) {
|
||||||
|
outputStream.close();
|
||||||
|
}
|
||||||
|
if (reader != null) {
|
||||||
|
reader.close();
|
||||||
|
}
|
||||||
|
if (connection != null) {
|
||||||
|
connection.disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -56,9 +56,9 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysBaseAPI sysBaseAPI;
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
@GetMapping("/tree")
|
@PostMapping("/tree")
|
||||||
public Result<List<TreeNode>> getTree() {
|
public Result<List<TreeNode>> getTree(@RequestBody ConfigServiceDirective dto) {
|
||||||
List<TreeNode> data = service.getTreeData();
|
List<TreeNode> data = service.getTreeData(dto.getFilterIzEnabled());
|
||||||
return Result.ok(data);
|
return Result.ok(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -285,5 +285,7 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
private String syncIds;
|
private String syncIds;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String excludeIds;//需要排除的ids
|
private String excludeIds;//需要排除的ids
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String filterIzEnabled;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public interface IConfigServiceDirectiveService extends IService<ConfigServiceDi
|
||||||
|
|
||||||
void auditPass(DirectiveAsyncMQDto dto);
|
void auditPass(DirectiveAsyncMQDto dto);
|
||||||
|
|
||||||
List<TreeNode> getTreeData();
|
List<TreeNode> getTreeData(String filterIzEnabled);
|
||||||
|
|
||||||
List<ConfigServiceDirective> allData();
|
List<ConfigServiceDirective> allData();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ package com.nu.modules.servicedirective.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
|
@ -26,6 +28,7 @@ import com.nu.modules.servicetype.entity.ConfigServiceType;
|
||||||
import com.nu.modules.servicetype.service.IConfigServiceTypeService;
|
import com.nu.modules.servicetype.service.IConfigServiceTypeService;
|
||||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||||
import com.nu.mq.directive.listener.DirectiveMQListener;
|
import com.nu.mq.directive.listener.DirectiveMQListener;
|
||||||
|
import com.nu.utils.HttpRequestUtil;
|
||||||
import com.nu.utils.RabbitMQUtil;
|
import com.nu.utils.RabbitMQUtil;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
@ -36,8 +39,12 @@ import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -437,7 +444,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TreeNode> getTreeData() {
|
public List<TreeNode> getTreeData(String filterIzEnabled) {
|
||||||
//查询周期类型字典项备用
|
//查询周期类型字典项备用
|
||||||
List<DictModel> period_type = sysBaseAPI.getDictItems("period_type");
|
List<DictModel> period_type = sysBaseAPI.getDictItems("period_type");
|
||||||
Map<String, String> cycleTypeMap = Maps.newHashMap();
|
Map<String, String> cycleTypeMap = Maps.newHashMap();
|
||||||
|
|
@ -469,23 +476,35 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
boolean typUsing = true;
|
boolean typUsing = true;
|
||||||
for (InstructionTag inst : instructions) {
|
for (InstructionTag inst : instructions) {
|
||||||
insUsing = "0".equals(inst.getIzEnabled());
|
insUsing = "0".equals(inst.getIzEnabled());
|
||||||
|
if ("enabled".equals(filterIzEnabled) && !insUsing) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing);
|
TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing);
|
||||||
List<ConfigServiceCategory> catList = catMap.get(inst.getId());
|
List<ConfigServiceCategory> catList = catMap.get(inst.getId());
|
||||||
if (catList != null) {
|
if (catList != null) {
|
||||||
catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort));
|
catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort));
|
||||||
for (ConfigServiceCategory cat : catList) {
|
for (ConfigServiceCategory cat : catList) {
|
||||||
catUsing = "0".equals(cat.getIzEnabled());
|
catUsing = "0".equals(cat.getIzEnabled());
|
||||||
|
if ("enabled".equals(filterIzEnabled) && !catUsing) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing);
|
TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing);
|
||||||
List<ConfigServiceType> typeList = typeMap.get(cat.getId());
|
List<ConfigServiceType> typeList = typeMap.get(cat.getId());
|
||||||
if (typeList != null) {
|
if (typeList != null) {
|
||||||
typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort));
|
typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort));
|
||||||
for (ConfigServiceType tp : typeList) {
|
for (ConfigServiceType tp : typeList) {
|
||||||
typUsing = "0".equals(tp.getIzEnabled());
|
typUsing = "0".equals(tp.getIzEnabled());
|
||||||
|
if ("enabled".equals(filterIzEnabled) && !typUsing) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing);
|
TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing);
|
||||||
List<ConfigServiceDirective> dirList = directiveMap.get(tp.getId());
|
List<ConfigServiceDirective> dirList = directiveMap.get(tp.getId());
|
||||||
if (dirList != null) {
|
if (dirList != null) {
|
||||||
dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort));
|
dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort));
|
||||||
for (ConfigServiceDirective dir : dirList) {
|
for (ConfigServiceDirective dir : dirList) {
|
||||||
|
if ("enabled".equals(filterIzEnabled) && "1".equals(dir.getIzEnabled())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TreeNode dirNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), dir.getId(), dir.getDirectiveName(), 4, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing);
|
TreeNode dirNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), dir.getId(), dir.getDirectiveName(), 4, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing);
|
||||||
TreeNode tagNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), IdUtil.simpleUUID(), "标签", 5, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing);
|
TreeNode tagNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), IdUtil.simpleUUID(), "标签", 5, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing);
|
||||||
tagNode.setBodyTagList(dir.getBodyTagList());
|
tagNode.setBodyTagList(dir.getBodyTagList());
|
||||||
|
|
@ -511,11 +530,11 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param syncIds 需要同步的指令ID
|
* @param syncIds 需要同步的指令ID
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DS("#sourceOrgCode")
|
@DS("#sourceOrgCode")
|
||||||
public DirectiveMQDto syncDirective(String sourceOrgCode,String syncIds) {
|
public DirectiveMQDto syncDirective(String sourceOrgCode, String syncIds) {
|
||||||
DirectiveMQDto directiveMQDto = new DirectiveMQDto();
|
DirectiveMQDto directiveMQDto = new DirectiveMQDto();
|
||||||
List<ConfigServiceDirective> directives;
|
List<ConfigServiceDirective> directives;
|
||||||
List<String> directiveIds = Arrays.asList(syncIds.split(","));
|
List<String> directiveIds = Arrays.asList(syncIds.split(","));
|
||||||
|
|
@ -595,25 +614,32 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
{
|
{
|
||||||
directiveMQDto.setEmotionTagList(BeanUtil.copyToList(emotionTagService.selectAll(directiveIds, null), EmotionTagMQDto.class));
|
directiveMQDto.setEmotionTagList(BeanUtil.copyToList(emotionTagService.selectAll(directiveIds, null), EmotionTagMQDto.class));
|
||||||
}
|
}
|
||||||
directiveMQListener.handleIncremental2("master",directiveMQDto);
|
directiveMQListener.handleIncremental2("master", directiveMQDto);
|
||||||
|
|
||||||
String apiAddress = "";
|
String apiAddress = "";
|
||||||
//TODO 待调整
|
//查询源数据平台的接口api地址
|
||||||
// if("101".equals(sourceOrgCode)){
|
{
|
||||||
// apiAddress = "http://localhost:8091/nursing-unit_101";
|
//各平台api地址都存在管理系统中 管理系统api地址在系统参数配置中 “ope_open_url”
|
||||||
// }else if("102".equals(sourceOrgCode)){
|
JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url");
|
||||||
// apiAddress = "http://localhost:8092/nursing-unit_102";
|
String opeApiAddress = opeOpenUrl.getString("configValue");
|
||||||
// }else if("103".equals(sourceOrgCode)){
|
if (opeApiAddress.endsWith("/")) {
|
||||||
// apiAddress = "http://localhost:8093/nursing-unit_103";
|
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
|
||||||
// }
|
}
|
||||||
if("101".equals(sourceOrgCode)){
|
String bizApiAddress = opeApiAddress + "/api/baseInfo/getOrgApiAddress?orgCode=" + sourceOrgCode;
|
||||||
apiAddress = "https://www.focusnu.com/nursingunit101";
|
|
||||||
}else if("102".equals(sourceOrgCode)){
|
try {
|
||||||
apiAddress = "https://www.focusnu.com/nursingunit102";
|
String res = HttpRequestUtil.doGet(bizApiAddress, HttpRequestUtil.createDefaultHeaders());
|
||||||
}else if("103".equals(sourceOrgCode)){
|
JSONObject jsonResponse = JSON.parseObject(res);
|
||||||
apiAddress = "https://www.focusnu.com/nursingunit103";
|
JSONObject result = jsonResponse.getJSONObject("result");
|
||||||
|
apiAddress = result.getString("url");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
directiveMQListener.handleCreateMedia2(directiveMQDto,apiAddress);
|
|
||||||
|
directiveMQListener.handleCreateMedia2(directiveMQDto, apiAddress);
|
||||||
//给对应业务平台发送消息
|
//给对应业务平台发送消息
|
||||||
return directiveMQDto;
|
return directiveMQDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -754,6 +754,9 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.length == 4) {
|
if (params.length == 4) {
|
||||||
|
//注释的两个是解决条件语句有逗号的问题 但是光改这里不行 还有其他方法会直接已逗号拆分为数组等 如loadDict 如果改不全就会导致未知功能报错
|
||||||
|
// int thirdCommaIndex = dictCode.indexOf(',', dictCode.indexOf(',', dictCode.indexOf(',') + 1) + 1);
|
||||||
|
// ls = this.queryTableDictItemsByCodeAndFilter(params[0], params[1], params[2], dictCode.substring(thirdCommaIndex + 1));
|
||||||
ls = this.queryTableDictItemsByCodeAndFilter(params[0], params[1], params[2], params[3]);
|
ls = this.queryTableDictItemsByCodeAndFilter(params[0], params[1], params[2], params[3]);
|
||||||
} else if (params.length == 3) {
|
} else if (params.length == 3) {
|
||||||
ls = this.queryTableDictItemsByCode(params[0], params[1], params[2]);
|
ls = this.queryTableDictItemsByCode(params[0], params[1], params[2]);
|
||||||
|
|
|
||||||
|
|
@ -186,31 +186,16 @@ spring:
|
||||||
password: nu002
|
password: nu002
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-datasource1:
|
devops:
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.2.199:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: nu_sys
|
username: nu_sys
|
||||||
password: nu_sys
|
password: nu_sys
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-试验田
|
# 多数据源配置-管理系统
|
||||||
nuro:
|
ope:
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.2.199:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: nu_ro
|
username: nu_sys
|
||||||
password: nu_ro
|
password: nu_sys
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
101:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false
|
|
||||||
username: nu001
|
|
||||||
password: nu001
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
102:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
|
|
||||||
username: nu002
|
|
||||||
password: nu002
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
103:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
|
|
||||||
username: nu003
|
|
||||||
password: nu003
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
|
|
|
||||||
|
|
@ -186,31 +186,16 @@ spring:
|
||||||
password: nu003
|
password: nu003
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-datasource1:
|
devops:
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.2.199:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: nu_sys
|
username: nu_sys
|
||||||
password: nu_sys
|
password: nu_sys
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-试验田
|
# 多数据源配置-管理系统
|
||||||
nuro:
|
ope:
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.2.199:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: nu_ro
|
username: nu_sys
|
||||||
password: nu_ro
|
password: nu_sys
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
101:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false
|
|
||||||
username: nu001
|
|
||||||
password: nu001
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
102:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
|
|
||||||
username: nu002
|
|
||||||
password: nu002
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
103:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
|
|
||||||
username: nu003
|
|
||||||
password: nu003
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
|
|
|
||||||
|
|
@ -186,32 +186,17 @@ spring:
|
||||||
password: nu001
|
password: nu001
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-nudevops:
|
devops:
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.2.199:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: nu_sys
|
username: nu_sys
|
||||||
password: nu_sys
|
password: nu_sys
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-管理系统
|
||||||
multi-datasource1:
|
ope:
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.2.199:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: nu_sys
|
username: nu_sys
|
||||||
password: nu_sys
|
password: nu_sys
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
101:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false
|
|
||||||
username: nu001
|
|
||||||
password: nu001
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
102:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
|
|
||||||
username: nu002
|
|
||||||
password: nu002
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
103:
|
|
||||||
url: jdbc:mysql://192.168.2.199:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=true&requireSSL=true&verifyServerCertificate=false&allowPublicKeyRetrieval=true
|
|
||||||
username: nu003
|
|
||||||
password: nu003
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
|
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
|
|
|
||||||
|
|
@ -186,38 +186,17 @@ spring:
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-nudevops:
|
devops:
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://mysql8-prod:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: fw8864sshdang
|
username: fw8864sshdang
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-datasource1:
|
ope:
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: fw8864sshdang
|
username: fw8864sshdang
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
101:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
102:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
103:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
# 多数据源配置-试验田 TODO 需要创建对应只读账号 不同服务器间需要更改ip端口 另外注意是否采用了VPC
|
|
||||||
# nuro:
|
|
||||||
# url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
# username: fw8864sshdang
|
|
||||||
# password: uGDBkM25I6nZCNM2
|
|
||||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
database: 0
|
database: 0
|
||||||
|
|
|
||||||
|
|
@ -186,38 +186,17 @@ spring:
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-nudevops:
|
devops:
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://mysql8-prod:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: fw8864sshdang
|
username: fw8864sshdang
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-datasource1:
|
ope:
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: fw8864sshdang
|
username: fw8864sshdang
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-试验田 TODO 需要创建对应只读账号 不同服务器间需要更改ip端口 另外注意是否采用了VPC
|
|
||||||
nuro:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
101:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
102:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
103:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
database: 0
|
database: 0
|
||||||
|
|
|
||||||
|
|
@ -186,38 +186,17 @@ spring:
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-nudevops:
|
devops:
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://mysql8-prod:3306/nu_devops?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: fw8864sshdang
|
username: fw8864sshdang
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-运维系统
|
# 多数据源配置-运维系统
|
||||||
multi-datasource1:
|
ope:
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://mysql8-prod:3306/nursing_unit?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||||
username: fw8864sshdang
|
username: fw8864sshdang
|
||||||
password: uGDBkM25I6nZCNM2
|
password: uGDBkM25I6nZCNM2
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# 多数据源配置-试验田 TODO 需要创建对应只读账号 不同服务器间需要更改ip端口 另外注意是否采用了VPC
|
|
||||||
nuro:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
101:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
102:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_002?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
103:
|
|
||||||
url: jdbc:mysql://mysql8-prod:3306/nursing_unit_003?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
|
||||||
username: fw8864sshdang
|
|
||||||
password: uGDBkM25I6nZCNM2
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
#redis 配置
|
#redis 配置
|
||||||
redis:
|
redis:
|
||||||
database: 0
|
database: 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue