Commit 90ca2549 authored by suhuiguang's avatar suhuiguang

1.集群es redis 适配

parent 51c5b9e7
package com.yeejoin.amos.boot.module.elevator.biz.config; package com.yeejoin.amos.boot.module.elevator.biz.config;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope; import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider; import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration @Configuration
public class ElasticSearchClientConfig { public class ElasticSearchClientConfig {
...@@ -35,27 +34,19 @@ public class ElasticSearchClientConfig { ...@@ -35,27 +34,19 @@ public class ElasticSearchClientConfig {
new UsernamePasswordCredentials(username, password)); new UsernamePasswordCredentials(username, password));
try { try {
String url = uris.replace("http://", ""); HttpHost[] httpHosts = Arrays.stream(uris.split(",")).map(HttpHost::create).toArray(HttpHost[]::new);
final String[] parts = StringUtils.split(url, ":"); RestClientBuilder builder = RestClient.builder(httpHosts);
HttpHost httpHost = new HttpHost(parts[0], Integer.parseInt(parts[1]), "http"); builder.setHttpClientConfigCallback(httpClientBuilder -> {
RestClientBuilder builder = RestClient.builder(httpHost); httpClientBuilder.disableAuthCaching();
builder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() { return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
@Override });
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) { // 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
httpClientBuilder.disableAuthCaching(); builder.setRequestConfigCallback(requestConfigBuilder -> {
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider); // 连接超时(默认为1秒)
} return requestConfigBuilder.setConnectTimeout(5000 * 1000)
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
.setSocketTimeout(6000 * 1000);
}); });
builder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
public RequestConfig.Builder customizeRequestConfig(
RequestConfig.Builder requestConfigBuilder) {
return requestConfigBuilder.setConnectTimeout(5000 * 1000) // 连接超时(默认为1秒)
.setSocketTimeout(6000 * 1000);// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
}
});// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
return new RestHighLevelClient(builder); return new RestHighLevelClient(builder);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -148,17 +148,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -148,17 +148,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//一码通复制功能url参数key //一码通复制功能url参数key
private static final String COPY_KEY = "stashType"; private static final String COPY_KEY = "stashType";
@Value("${biz.elasticsearch.address}")
private String esAddress;
@Value("${biz.elasticsearch.port}") @Autowired
private Integer esPort; RestHighLevelClient restHighLevelClient;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
private static String USE_CODE = "use_code"; private static String USE_CODE = "use_code";
...@@ -1200,11 +1192,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1200,11 +1192,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return save; return save;
} }
public Page<JSONObject> queryByKeys(JSONObject map) { public Page<JSONObject> queryByKeys(JSONObject map) {
//根据当前登录人查询 // //根据当前登录人查询
if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) { if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) {
map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString()); map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString());
} }
ResponseModel<Page<Map<String, Object>>> model = new ResponseModel<>();
JSONObject object = getCompanyType().get(0); JSONObject object = getCompanyType().get(0);
String level = object.getString("level"); String level = object.getString("level");
String code = object.getString("orgCode"); String code = object.getString("orgCode");
...@@ -1219,19 +1210,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1219,19 +1210,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
} }
Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size")); Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size"));
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient = new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress, esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
SearchSourceBuilder builder = new SearchSourceBuilder(); SearchSourceBuilder builder = new SearchSourceBuilder();
...@@ -1329,7 +1307,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1329,7 +1307,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<JSONObject> list = new LinkedList<>(); List<JSONObject> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) {
System.out.println(hit); System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
...@@ -1348,7 +1326,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1348,7 +1326,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
throw new RuntimeException(e); throw new RuntimeException(e);
} finally { } finally {
try { try {
esClient.close(); restHighLevelClient.close();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -10,25 +10,15 @@ import com.yeejoin.amos.boot.module.elevator.flc.api.dto.CylinderFillingRecordDt ...@@ -10,25 +10,15 @@ import com.yeejoin.amos.boot.module.elevator.flc.api.dto.CylinderFillingRecordDt
import com.yeejoin.amos.boot.module.elevator.flc.api.entity.CylinderFillingRecord; import com.yeejoin.amos.boot.module.elevator.flc.api.entity.CylinderFillingRecord;
import com.yeejoin.amos.boot.module.elevator.flc.api.mapper.CylinderFillingRecordMapper; import com.yeejoin.amos.boot.module.elevator.flc.api.mapper.CylinderFillingRecordMapper;
import com.yeejoin.amos.boot.module.elevator.flc.api.service.ICylinderFillingRecordService; import com.yeejoin.amos.boot.module.elevator.flc.api.service.ICylinderFillingRecordService;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -55,17 +45,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -55,17 +45,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Autowired @Autowired
CylinderFillingRecordMapper cylinderFillingRecordMapper; CylinderFillingRecordMapper cylinderFillingRecordMapper;
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
/** /**
* 分页查询 * 分页查询
...@@ -127,7 +108,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -127,7 +108,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
//@Scheduled(cron = "${tzs.cylinder.fill.cron}") //@Scheduled(cron = "${tzs.cylinder.fill.cron}")
public void setTimeSaveCylinderInfoToES(){ public void setTimeSaveCylinderInfoToES() {
Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>(); Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>();
Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
Long count = cyinderInfoList.getCurrent(); Long count = cyinderInfoList.getCurrent();
...@@ -143,10 +124,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -143,10 +124,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
cylinderFillingRecordPage.setCurrent(i); cylinderFillingRecordPage.setCurrent(i);
cylinderFillingRecordPage.setSize(1000); cylinderFillingRecordPage.setSize(1000);
cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
cylinderFillingRecordPage.getRecords().stream().map(item->{ cylinderFillingRecordPage.getRecords().stream().map(item -> {
if(!ObjectUtils.isEmpty(item.getSequenceCode())){ if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(),item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
item.setUnitName(cyinderFillingRecordInfo.getUnitName()); item.setUnitName(cyinderFillingRecordInfo.getUnitName());
item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum()); item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum());
item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety()); item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety());
...@@ -164,7 +145,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -164,7 +145,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
// for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) { // for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) {
// saveCylinderFillingRecordToES(ci); // saveCylinderFillingRecordToES(ci);
// } // }
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords()); saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords());
} }
} }
...@@ -174,7 +155,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -174,7 +155,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Override @Override
public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) { public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) {
Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto); Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto);
if(!ObjectUtils.isEmpty(cyinderFillingRecord)){ if (!ObjectUtils.isEmpty(cyinderFillingRecord)) {
cyinderFillingRecord.getRecords().stream().map(item -> { cyinderFillingRecord.getRecords().stream().map(item -> {
if (!ObjectUtils.isEmpty(item.getSequenceCode())) { if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
...@@ -202,26 +183,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -202,26 +183,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) { public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) {
Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize); Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize);
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient =new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress,esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
// RestHighLevelClient esClient = new RestHighLevelClient(
// RestClient.builder(new HttpHost(esAddress, esPort, "http"))
// );
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("cylinder_filling"); request.indices("cylinder_filling");
...@@ -328,7 +289,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -328,7 +289,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
boolMust.must(query); boolMust.must(query);
} }
if(flag) { // 搜索全部 if (flag) { // 搜索全部
boolMust.must(QueryBuilders.matchAllQuery()); boolMust.must(QueryBuilders.matchAllQuery());
} }
...@@ -340,9 +301,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -340,9 +301,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<ESCylinderFillingRecordDto> list = new LinkedList<>(); List<ESCylinderFillingRecordDto> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits()) {
System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class); ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class);
list.add(esCylinderFillingRecordDto1); list.add(esCylinderFillingRecordDto1);
...@@ -352,6 +312,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -352,6 +312,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle); result.setTotal(totle);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
} }
return result; return result;
...@@ -362,7 +328,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -362,7 +328,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>(); List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>();
for (ESCylinderFillingRecordDto record : records) { for (ESCylinderFillingRecordDto record : records) {
CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord(); CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord();
BeanUtils.copyProperties(record,cylinderFillingRecord); BeanUtils.copyProperties(record, cylinderFillingRecord);
cylinderFillingRecord.setIsNotEs("1"); cylinderFillingRecord.setIsNotEs("1");
cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr()); cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr());
cylinderFillingRecordList.add(cylinderFillingRecord); cylinderFillingRecordList.add(cylinderFillingRecord);
......
#DB properties: #DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:23306/tzs_amos_tzs_biz_init?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:vastbase://192.168.249.180:54321/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://192.168.249.13:10001/eureka/,http://192.168.249.139:10001/eureka/
#eureka properties: eureka.instance.prefer-ip-address=true
eureka.instance.hostname= eureka eureka.instance.ip-address=192.168.249.13
eureka.instance.prefer-ip-address = true management.endpoint.health.show-details=always
eureka.client.serviceUrl.defaultZone =http://36.46.151.113:10001/eureka/ management.endpoints.web.exposure.include=*
eureka.instance.ip-address = 172.16.3.133 eureka.instance.health-check-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/doc.html
## ES properties: ## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=docker-cluster
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username=elastic elasticsearch.username=elastic
elasticsearch.password=123456 elasticsearch.password=Yeejoin@2023
spring.elasticsearch.rest.uris=http://192.168.249.218:9200,http://192.168.249.114:9200,http://192.168.249.155:9200
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 #集群环境
spring.redis.host=36.46.151.113 spring.redis.cluster.nodes=192.168.249.218:6377,192.168.249.114:6377,192.168.249.155:6377
spring.redis.port=16379 spring.redis.password=Yeejoin@2023
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200 spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1 spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883 emqx.broker=tcp://192.168.249.180:2883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatTokenls
##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id
## \u9884\u8B66\u901A\u77E5\u6A21\u677Fid
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\u7763\u67E5\u6574\u6539\u901A\u77E5 ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
## \u516C\u4F17\u53F7\u6D4B\u8BD5\u7528\u6237id\uFF08\u5E73\u53F0userId\uFF09
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties
fileserver.domain=https://rpm.yeeamos.com:8888/
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://192.168.249.180:19000/
log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs
rule.definition.local-ip=192.168.249.13
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ?
# ??????????
minio.url.path=http://192.168.249.180:19000/
## 生成监管码前缀域名
regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://172.16.10.90:53306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.99:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.99:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=172.16.10.90
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= Yeejoin@2020
## unit(h)
alertcall.es.synchrony.time=48
fileserver.domain=https://rpm.yeeamos.com:8888/
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.10.90
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.90:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://172.16.10.90:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.elevator.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
org.filter.group.seq=1564150103147573249
duty.seats.role.ids=1585956200472674305,1585956257590706177
\ No newline at end of file
#DB properties: #DB properties:
spring.datasource.driver-class-name=cn.com.vastbase.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.username=admin spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://172.16.10.230:10001/eureka/
#DB properties:
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://172.16.10.230:53306/${TZS_BIZ_DATABASE}?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
#spring.datasource.username=${MYSQL_ROOT_USER}
#spring.datasource.password=${MYSQL_ROOT_PASSWORD}
#eureka prioperties:
#eureka.client.serviceUrl.defaultZone=http://172.16.10.230:10001/eureka/
#eureka.client.register-with-eureka=true
#eureka.client.fetch-registry=true
#eureka.client.healthcheck.enabled=true
#ribbon.eureka.enabled=true
#eureka.instance.hostname=${spring.cloud.client.ip-address}
#eureka.instance.prefer-ip-address=true
#eureka.instance.instance-id=${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
#eureka.instance.lease-expiration-duration-in-seconds=10
#eureka.instance.lease-renewal-interval-in-seconds=5
#management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
#
#eureka.instance.prefer-ip-address = true
#eureka.instance.ip-address = 172.16.10.230
eureka.client.service-url.defaultZone =http://172.16.10.230:10001/eureka/
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
...@@ -36,25 +11,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl ...@@ -36,25 +11,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address=172.16.3.34
eureka.instance.ip-address = 172.16.3.34
## ES properties: ## ES properties:
biz.elasticsearch.port=9200 elasticsearch.username=elastic
biz.elasticsearch.address=172.16.10.230 elasticsearch.password=a123456
spring.data.elasticsearch.cluster-name=docker-cluster spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= a123456
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.10.230 spring.redis.host=172.16.10.230
...@@ -65,7 +28,6 @@ spring.redis.lettuce.pool.max-wait=-1 ...@@ -65,7 +28,6 @@ spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
...@@ -73,20 +35,13 @@ emqx.broker=tcp://36.46.151.113:1883 ...@@ -73,20 +35,13 @@ emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.41.172.83:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatToken ##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -96,67 +51,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -96,67 +51,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id ## ??????id
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##?????? ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId? ## ???????id???userId?
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties ##new properties
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://172.16.10.230:19000/ fileserver.domain=http://172.16.10.230:19000/
log.level=INFO log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties: ## ???? properties:
rule.definition.load=false rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto ##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs rule.definition.default-agency=tzs
rule.definition.local-ip=172.16.10.230 rule.definition.local-ip=172.16.10.230
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ? tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ? tzs.cylinder.info.cron=0 0 1 * * ?
# ?????????? # ??????????
minio.url.path=http://172.16.10.230:9000/ minio.url.path=http://172.16.10.230:9000/
## ɼǰ׺ ## ɼǰ׺
regulatory_code_prefix=https://nav.sspai.top/tzs?code= regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560 outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://113.134.211.174:3306/xiy_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.28:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://192.168.1.10:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.3.28
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.28:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.elevator.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:13306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=36.46.151.113
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
...@@ -37,20 +37,20 @@ ...@@ -37,20 +37,20 @@
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" /> <logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
--> -->
<!--myibatis log configure--> <!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/> <logger name="com.apache.ibatis" level="debug"/>
<logger name="org.mybatis" level="INFO" /> <logger name="org.mybatis" level="debug" />
<logger name="java.sql.Connection" level="INFO"/> <logger name="java.sql.Connection" level="debug"/>
<logger name="java.sql.Statement" level="INFO"/> <logger name="java.sql.Statement" level="debug"/>
<logger name="java.sql.PreparedStatement" level="INFO"/> <logger name="java.sql.PreparedStatement" level="debug"/>
<logger name="org.springframework" level="INFO"/> <logger name="org.springframework" level="debug"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/> <logger name="com.baomidou.mybatisplus" level="debug"/>
<logger name="org.apache.activemq" level="INFO"/> <logger name="org.apache.activemq" level="debug"/>
<logger name="org.typroject" level="INFO"/> <logger name="org.typroject" level="debug"/>
<logger name="com.yeejoin" level="INFO"/> <logger name="com.yeejoin" level="debug"/>
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="ERROR"> <root level="error">
<!-- <appender-ref ref="FILE" /> --> <!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />--> <!-- <appender-ref ref="ELK" />-->
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/96333.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- ELK管理 -->
<appender name="ELK" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>172.16.10.230:4560</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/>
<logger name="org.mybatis" level="INFO" />
<logger name="java.sql.Connection" level="INFO"/>
<logger name="java.sql.Statement" level="INFO"/>
<logger name="java.sql.PreparedStatement" level="INFO"/>
<logger name="org.springframework" level="INFO"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="INFO"/>
<logger name="com.yeejoin" level="INFO"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />-->
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/96333.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/96333.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
package com.yeejoin.amos.boot.module.cylinder.biz.config; package com.yeejoin.amos.boot.module.cylinder.biz.config;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope; import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider; import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration @Configuration
public class ElasticSearchClientConfig { public class ElasticSearchClientConfig {
...@@ -35,27 +34,19 @@ public class ElasticSearchClientConfig { ...@@ -35,27 +34,19 @@ public class ElasticSearchClientConfig {
new UsernamePasswordCredentials(username, password)); new UsernamePasswordCredentials(username, password));
try { try {
String url = uris.replace("http://", ""); HttpHost[] httpHosts = Arrays.stream(uris.split(",")).map(HttpHost::create).toArray(HttpHost[]::new);
final String[] parts = StringUtils.split(url, ":"); RestClientBuilder builder = RestClient.builder(httpHosts);
HttpHost httpHost = new HttpHost(parts[0], Integer.parseInt(parts[1]), "http"); builder.setHttpClientConfigCallback(httpClientBuilder -> {
RestClientBuilder builder = RestClient.builder(httpHost); httpClientBuilder.disableAuthCaching();
builder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() { return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
@Override });
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) { // 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
httpClientBuilder.disableAuthCaching(); builder.setRequestConfigCallback(requestConfigBuilder -> {
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider); // 连接超时(默认为1秒)
} return requestConfigBuilder.setConnectTimeout(5000 * 1000)
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
.setSocketTimeout(6000 * 1000);
}); });
builder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
public RequestConfig.Builder customizeRequestConfig(
RequestConfig.Builder requestConfigBuilder) {
return requestConfigBuilder.setConnectTimeout(5000 * 1000) // 连接超时(默认为1秒)
.setSocketTimeout(6000 * 1000);// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
}
});// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
return new RestHighLevelClient(builder); return new RestHighLevelClient(builder);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -148,17 +148,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -148,17 +148,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//一码通复制功能url参数key //一码通复制功能url参数key
private static final String COPY_KEY = "stashType"; private static final String COPY_KEY = "stashType";
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
private static String USE_CODE = "use_code"; private static String USE_CODE = "use_code";
...@@ -1200,11 +1191,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1200,11 +1191,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return save; return save;
} }
public Page<JSONObject> queryByKeys(JSONObject map) { public Page<JSONObject> queryByKeys(JSONObject map) {
//根据当前登录人查询 // //根据当前登录人查询
if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) { if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) {
map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString()); map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString());
} }
ResponseModel<Page<Map<String, Object>>> model = new ResponseModel<>();
JSONObject object = getCompanyType().get(0); JSONObject object = getCompanyType().get(0);
String level = object.getString("level"); String level = object.getString("level");
String code = object.getString("orgCode"); String code = object.getString("orgCode");
...@@ -1219,19 +1209,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1219,19 +1209,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
} }
Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size")); Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size"));
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient = new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress, esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
SearchSourceBuilder builder = new SearchSourceBuilder(); SearchSourceBuilder builder = new SearchSourceBuilder();
...@@ -1329,7 +1306,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1329,7 +1306,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<JSONObject> list = new LinkedList<>(); List<JSONObject> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) {
System.out.println(hit); System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
...@@ -1348,7 +1325,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1348,7 +1325,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
throw new RuntimeException(e); throw new RuntimeException(e);
} finally { } finally {
try { try {
esClient.close(); restHighLevelClient.close();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -4,31 +4,22 @@ import com.alibaba.fastjson.JSONArray; ...@@ -4,31 +4,22 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.cylinder.biz.dao.ESCylinderFillingRecordRepository;
import com.yeejoin.amos.boot.module.cylinder.api.entity.ESCylinderFillingRecordDto; import com.yeejoin.amos.boot.module.cylinder.api.entity.ESCylinderFillingRecordDto;
import com.yeejoin.amos.boot.module.cylinder.biz.dao.ESCylinderFillingRecordRepository;
import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderFillingRecordDto; import com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderFillingRecordDto;
import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderFillingRecord; import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderFillingRecord;
import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderFillingRecordMapper; import com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderFillingRecordMapper;
import com.yeejoin.amos.boot.module.cylinder.flc.api.service.ICylinderFillingRecordService; import com.yeejoin.amos.boot.module.cylinder.flc.api.service.ICylinderFillingRecordService;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock; import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -56,17 +47,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -56,17 +47,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Autowired @Autowired
CylinderFillingRecordMapper cylinderFillingRecordMapper; CylinderFillingRecordMapper cylinderFillingRecordMapper;
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
/** /**
* 分页查询 * 分页查询
...@@ -128,8 +110,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -128,8 +110,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Scheduled(cron = "${tzs.cylinder.fill.cron}") @Scheduled(cron = "${tzs.cylinder.fill.cron}")
@SchedulerLock(name="cylinderFillingRecord2ESTask",lockAtMostFor = "PT6H") @SchedulerLock(name = "cylinderFillingRecord2ESTask", lockAtMostFor = "PT6H")
public void setTimeSaveCylinderInfoToES(){ public void setTimeSaveCylinderInfoToES() {
Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>(); Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>();
Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
Long count = cyinderInfoList.getCurrent(); Long count = cyinderInfoList.getCurrent();
...@@ -145,10 +127,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -145,10 +127,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
cylinderFillingRecordPage.setCurrent(i); cylinderFillingRecordPage.setCurrent(i);
cylinderFillingRecordPage.setSize(1000); cylinderFillingRecordPage.setSize(1000);
cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
cylinderFillingRecordPage.getRecords().stream().map(item->{ cylinderFillingRecordPage.getRecords().stream().map(item -> {
if(!ObjectUtils.isEmpty(item.getSequenceCode())){ if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(),item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
item.setUnitName(cyinderFillingRecordInfo.getUnitName()); item.setUnitName(cyinderFillingRecordInfo.getUnitName());
item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum()); item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum());
item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety()); item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety());
...@@ -166,7 +148,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -166,7 +148,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
// for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) { // for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) {
// saveCylinderFillingRecordToES(ci); // saveCylinderFillingRecordToES(ci);
// } // }
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords()); saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords());
} }
} }
...@@ -176,7 +158,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -176,7 +158,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Override @Override
public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) { public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) {
Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto); Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto);
if(!ObjectUtils.isEmpty(cyinderFillingRecord)){ if (!ObjectUtils.isEmpty(cyinderFillingRecord)) {
cyinderFillingRecord.getRecords().stream().map(item -> { cyinderFillingRecord.getRecords().stream().map(item -> {
if (!ObjectUtils.isEmpty(item.getSequenceCode())) { if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
...@@ -204,26 +186,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -204,26 +186,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) { public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) {
Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize); Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize);
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient =new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress,esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
// RestHighLevelClient esClient = new RestHighLevelClient(
// RestClient.builder(new HttpHost(esAddress, esPort, "http"))
// );
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("cylinder_filling"); request.indices("cylinder_filling");
...@@ -330,7 +292,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -330,7 +292,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
boolMust.must(query); boolMust.must(query);
} }
if(flag) { // 搜索全部 if (flag) { // 搜索全部
boolMust.must(QueryBuilders.matchAllQuery()); boolMust.must(QueryBuilders.matchAllQuery());
} }
...@@ -342,9 +304,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -342,9 +304,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<ESCylinderFillingRecordDto> list = new LinkedList<>(); List<ESCylinderFillingRecordDto> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits()) {
System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class); ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class);
list.add(esCylinderFillingRecordDto1); list.add(esCylinderFillingRecordDto1);
...@@ -354,6 +315,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -354,6 +315,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle); result.setTotal(totle);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
} }
return result; return result;
...@@ -364,7 +331,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -364,7 +331,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>(); List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>();
for (ESCylinderFillingRecordDto record : records) { for (ESCylinderFillingRecordDto record : records) {
CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord(); CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord();
BeanUtils.copyProperties(record,cylinderFillingRecord); BeanUtils.copyProperties(record, cylinderFillingRecord);
cylinderFillingRecord.setIsNotEs("1"); cylinderFillingRecord.setIsNotEs("1");
cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr()); cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr());
cylinderFillingRecordList.add(cylinderFillingRecord); cylinderFillingRecordList.add(cylinderFillingRecord);
......
#DB properties: #DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:23306/tzs_amos_tzs_biz_init?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:vastbase://192.168.249.180:54321/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://192.168.249.13:10001/eureka/,http://192.168.249.139:10001/eureka/
#eureka properties: eureka.instance.prefer-ip-address=true
eureka.instance.hostname= eureka eureka.instance.ip-address=192.168.249.13
eureka.instance.prefer-ip-address = true management.endpoint.health.show-details=always
eureka.client.serviceUrl.defaultZone =http://36.46.151.113:10001/eureka/ management.endpoints.web.exposure.include=*
eureka.instance.ip-address = 172.16.3.133 eureka.instance.health-check-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/doc.html
## ES properties: ## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=docker-cluster
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username=elastic elasticsearch.username=elastic
elasticsearch.password=123456 elasticsearch.password=Yeejoin@2023
spring.elasticsearch.rest.uris=http://192.168.249.218:9200,http://192.168.249.114:9200,http://192.168.249.155:9200
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 #集群环境
spring.redis.host=36.46.151.113 spring.redis.cluster.nodes=192.168.249.218:6377,192.168.249.114:6377,192.168.249.155:6377
spring.redis.port=16379 spring.redis.password=Yeejoin@2023
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200 spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1 spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883 emqx.broker=tcp://192.168.249.180:2883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatTokenls
##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id
## \u9884\u8B66\u901A\u77E5\u6A21\u677Fid
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\u7763\u67E5\u6574\u6539\u901A\u77E5 ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
## \u516C\u4F17\u53F7\u6D4B\u8BD5\u7528\u6237id\uFF08\u5E73\u53F0userId\uFF09
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties
fileserver.domain=https://rpm.yeeamos.com:8888/
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://192.168.249.180:19000/
log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs
rule.definition.local-ip=192.168.249.13
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ?
# ??????????
minio.url.path=http://192.168.249.180:19000/
## 生成监管码前缀域名
regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://172.16.10.90:53306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.99:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.99:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=172.16.10.90
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= Yeejoin@2020
## unit(h)
alertcall.es.synchrony.time=48
fileserver.domain=https://rpm.yeeamos.com:8888/
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.10.90
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.90:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://172.16.10.90:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.cylinder.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
org.filter.group.seq=1564150103147573249
duty.seats.role.ids=1585956200472674305,1585956257590706177
\ No newline at end of file
#DB properties: #DB properties:
spring.datasource.driver-class-name=cn.com.vastbase.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.username=admin spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://172.16.10.230:10001/eureka/
#DB properties:
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://172.16.10.230:53306/${TZS_BIZ_DATABASE}?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
#spring.datasource.username=${MYSQL_ROOT_USER}
#spring.datasource.password=${MYSQL_ROOT_PASSWORD}
#eureka prioperties:
#eureka.client.serviceUrl.defaultZone=http://172.16.10.230:10001/eureka/
#eureka.client.register-with-eureka=true
#eureka.client.fetch-registry=true
#eureka.client.healthcheck.enabled=true
#ribbon.eureka.enabled=true
#eureka.instance.hostname=${spring.cloud.client.ip-address}
#eureka.instance.prefer-ip-address=true
#eureka.instance.instance-id=${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
#eureka.instance.lease-expiration-duration-in-seconds=10
#eureka.instance.lease-renewal-interval-in-seconds=5
#management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
#
#eureka.instance.prefer-ip-address = true
#eureka.instance.ip-address = 172.16.10.230
eureka.client.service-url.defaultZone =http://172.16.10.230:10001/eureka/
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
...@@ -36,25 +11,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl ...@@ -36,25 +11,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address=172.16.3.34
eureka.instance.ip-address = 172.16.3.34
## ES properties: ## ES properties:
biz.elasticsearch.port=9200 elasticsearch.username=elastic
biz.elasticsearch.address=172.16.10.230 elasticsearch.password=a123456
spring.data.elasticsearch.cluster-name=docker-cluster spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= a123456
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.10.230 spring.redis.host=172.16.10.230
...@@ -65,7 +28,6 @@ spring.redis.lettuce.pool.max-wait=-1 ...@@ -65,7 +28,6 @@ spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
...@@ -73,20 +35,13 @@ emqx.broker=tcp://36.46.151.113:1883 ...@@ -73,20 +35,13 @@ emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.41.172.83:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatToken ##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -96,67 +51,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -96,67 +51,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id ## ??????id
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##?????? ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId? ## ???????id???userId?
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties ##new properties
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://172.16.10.230:19000/ fileserver.domain=http://172.16.10.230:19000/
log.level=INFO log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties: ## ???? properties:
rule.definition.load=false rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto ##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs rule.definition.default-agency=tzs
rule.definition.local-ip=172.16.10.230 rule.definition.local-ip=172.16.10.230
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ? tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ? tzs.cylinder.info.cron=0 0 1 * * ?
# ?????????? # ??????????
minio.url.path=http://172.16.10.230:9000/ minio.url.path=http://172.16.10.230:9000/
## ɼǰ׺ ## ɼǰ׺
regulatory_code_prefix=https://nav.sspai.top/tzs?code= regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560 outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://113.134.211.174:3306/xiy_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.28:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://192.168.1.10:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.3.28
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.28:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.cylinder.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:13306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=36.46.151.113
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名--> <!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/96333.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern> <FileNamePattern>${LOG_HOME}/Tcm.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<MaxHistory>30</MaxHistory> <MaxHistory>30</MaxHistory>
<!--日志文件大小--> <!--日志文件大小-->
...@@ -37,20 +37,20 @@ ...@@ -37,20 +37,20 @@
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" /> <logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
--> -->
<!--myibatis log configure--> <!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/> <logger name="com.apache.ibatis" level="debug"/>
<logger name="org.mybatis" level="INFO" /> <logger name="org.mybatis" level="debug" />
<logger name="java.sql.Connection" level="INFO"/> <logger name="java.sql.Connection" level="debug"/>
<logger name="java.sql.Statement" level="INFO"/> <logger name="java.sql.Statement" level="debug"/>
<logger name="java.sql.PreparedStatement" level="INFO"/> <logger name="java.sql.PreparedStatement" level="debug"/>
<logger name="org.springframework" level="INFO"/> <logger name="org.springframework" level="debug"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/> <logger name="com.baomidou.mybatisplus" level="debug"/>
<logger name="org.apache.activemq" level="INFO"/> <logger name="org.apache.activemq" level="debug"/>
<logger name="org.typroject" level="INFO"/> <logger name="org.typroject" level="debug"/>
<logger name="com.yeejoin" level="INFO"/> <logger name="com.yeejoin" level="debug"/>
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="DEBUG"> <root level="error">
<!-- <appender-ref ref="FILE" /> --> <!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />--> <!-- <appender-ref ref="ELK" />-->
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/cylinder.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- ELK管理 -->
<appender name="ELK" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>172.16.10.230:4560</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/>
<logger name="org.mybatis" level="INFO" />
<logger name="java.sql.Connection" level="INFO"/>
<logger name="java.sql.Statement" level="INFO"/>
<logger name="java.sql.PreparedStatement" level="INFO"/>
<logger name="org.springframework" level="INFO"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="INFO"/>
<logger name="com.yeejoin" level="INFO"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />-->
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/cylinder.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/cylinder.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
package com.yeejoin.amos.boot.module.jczs.biz.config; package com.yeejoin.amos.boot.module.jczs.biz.config;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope; import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider; import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration @Configuration
public class ElasticSearchClientConfig { public class ElasticSearchClientConfig {
...@@ -28,34 +27,25 @@ public class ElasticSearchClientConfig { ...@@ -28,34 +27,25 @@ public class ElasticSearchClientConfig {
private String password; private String password;
@Bean @Bean
@Qualifier("highLevelClient")
public RestHighLevelClient restHighLevelClient() { public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(username, password)); new UsernamePasswordCredentials(username, password));
try { try {
String url = uris.replace("http://", ""); HttpHost[] httpHosts = Arrays.stream(uris.split(",")).map(HttpHost::create).toArray(HttpHost[]::new);
final String[] parts = StringUtils.split(url, ":"); RestClientBuilder builder = RestClient.builder(httpHosts);
HttpHost httpHost = new HttpHost(parts[0], Integer.parseInt(parts[1]), "http"); builder.setHttpClientConfigCallback(httpClientBuilder -> {
RestClientBuilder builder = RestClient.builder(httpHost); httpClientBuilder.disableAuthCaching();
builder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() { return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
@Override });
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) { // 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
httpClientBuilder.disableAuthCaching(); builder.setRequestConfigCallback(requestConfigBuilder -> {
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider); // 连接超时(默认为1秒)
} return requestConfigBuilder.setConnectTimeout(5000 * 1000)
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
.setSocketTimeout(6000 * 1000);
}); });
builder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
public RequestConfig.Builder customizeRequestConfig(
RequestConfig.Builder requestConfigBuilder) {
return requestConfigBuilder.setConnectTimeout(5000 * 1000) // 连接超时(默认为1秒)
.setSocketTimeout(6000 * 1000);// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
}
});// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
return new RestHighLevelClient(builder); return new RestHighLevelClient(builder);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -89,6 +89,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -89,6 +89,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Autowired @Autowired
EquipmentCategoryMapper equipmentCategoryMapper; EquipmentCategoryMapper equipmentCategoryMapper;
@Autowired
RestHighLevelClient restHighLevelClient;
@Value("classpath:/json/equipCategory.json") @Value("classpath:/json/equipCategory.json")
private Resource equipCategory; private Resource equipCategory;
...@@ -148,18 +151,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -148,18 +151,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//一码通复制功能url参数key //一码通复制功能url参数key
private static final String COPY_KEY = "stashType"; private static final String COPY_KEY = "stashType";
@Value("${biz.elasticsearch.address}")
private String esAddress;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
private static String USE_CODE = "use_code"; private static String USE_CODE = "use_code";
private static String ORG_BRANCH_CODE = "supervise_org_code"; private static String ORG_BRANCH_CODE = "supervise_org_code";
...@@ -1200,11 +1191,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1200,11 +1191,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return save; return save;
} }
public Page<JSONObject> queryByKeys(JSONObject map) { public Page<JSONObject> queryByKeys(JSONObject map) {
//根据当前登录人查询 // //根据当前登录人查询
if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) { if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) {
map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString()); map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString());
} }
ResponseModel<Page<Map<String, Object>>> model = new ResponseModel<>();
JSONObject object = getCompanyType().get(0); JSONObject object = getCompanyType().get(0);
String level = object.getString("level"); String level = object.getString("level");
String code = object.getString("orgCode"); String code = object.getString("orgCode");
...@@ -1219,19 +1209,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1219,19 +1209,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
} }
Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size")); Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size"));
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient = new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress, esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
SearchSourceBuilder builder = new SearchSourceBuilder(); SearchSourceBuilder builder = new SearchSourceBuilder();
...@@ -1329,7 +1306,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1329,7 +1306,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<JSONObject> list = new LinkedList<>(); List<JSONObject> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) {
System.out.println(hit); System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
...@@ -1348,7 +1325,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1348,7 +1325,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
throw new RuntimeException(e); throw new RuntimeException(e);
} finally { } finally {
try { try {
esClient.close(); restHighLevelClient.close();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -10,24 +10,15 @@ import com.yeejoin.amos.boot.module.jczs.flc.api.dto.CylinderFillingRecordDto; ...@@ -10,24 +10,15 @@ import com.yeejoin.amos.boot.module.jczs.flc.api.dto.CylinderFillingRecordDto;
import com.yeejoin.amos.boot.module.jczs.flc.api.entity.CylinderFillingRecord; import com.yeejoin.amos.boot.module.jczs.flc.api.entity.CylinderFillingRecord;
import com.yeejoin.amos.boot.module.jczs.flc.api.mapper.CylinderFillingRecordMapper; import com.yeejoin.amos.boot.module.jczs.flc.api.mapper.CylinderFillingRecordMapper;
import com.yeejoin.amos.boot.module.jczs.flc.api.service.ICylinderFillingRecordService; import com.yeejoin.amos.boot.module.jczs.flc.api.service.ICylinderFillingRecordService;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -55,17 +46,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -55,17 +46,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Autowired @Autowired
CylinderFillingRecordMapper cylinderFillingRecordMapper; CylinderFillingRecordMapper cylinderFillingRecordMapper;
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
/** /**
* 分页查询 * 分页查询
...@@ -127,7 +109,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -127,7 +109,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Scheduled(cron = "${tzs.cylinder.fill.cron}") @Scheduled(cron = "${tzs.cylinder.fill.cron}")
public void setTimeSaveCylinderInfoToES(){ public void setTimeSaveCylinderInfoToES() {
Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>(); Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>();
Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
Long count = cyinderInfoList.getCurrent(); Long count = cyinderInfoList.getCurrent();
...@@ -143,10 +125,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -143,10 +125,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
cylinderFillingRecordPage.setCurrent(i); cylinderFillingRecordPage.setCurrent(i);
cylinderFillingRecordPage.setSize(1000); cylinderFillingRecordPage.setSize(1000);
cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
cylinderFillingRecordPage.getRecords().stream().map(item->{ cylinderFillingRecordPage.getRecords().stream().map(item -> {
if(!ObjectUtils.isEmpty(item.getSequenceCode())){ if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(),item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
item.setUnitName(cyinderFillingRecordInfo.getUnitName()); item.setUnitName(cyinderFillingRecordInfo.getUnitName());
item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum()); item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum());
item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety()); item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety());
...@@ -164,7 +146,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -164,7 +146,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
// for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) { // for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) {
// saveCylinderFillingRecordToES(ci); // saveCylinderFillingRecordToES(ci);
// } // }
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords()); saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords());
} }
} }
...@@ -174,7 +156,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -174,7 +156,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Override @Override
public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) { public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) {
Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto); Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto);
if(!ObjectUtils.isEmpty(cyinderFillingRecord)){ if (!ObjectUtils.isEmpty(cyinderFillingRecord)) {
cyinderFillingRecord.getRecords().stream().map(item -> { cyinderFillingRecord.getRecords().stream().map(item -> {
if (!ObjectUtils.isEmpty(item.getSequenceCode())) { if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
...@@ -202,26 +184,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -202,26 +184,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) { public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) {
Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize); Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize);
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient =new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress,esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
// RestHighLevelClient esClient = new RestHighLevelClient(
// RestClient.builder(new HttpHost(esAddress, esPort, "http"))
// );
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("cylinder_filling"); request.indices("cylinder_filling");
...@@ -328,7 +290,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -328,7 +290,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
boolMust.must(query); boolMust.must(query);
} }
if(flag) { // 搜索全部 if (flag) { // 搜索全部
boolMust.must(QueryBuilders.matchAllQuery()); boolMust.must(QueryBuilders.matchAllQuery());
} }
...@@ -340,9 +302,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -340,9 +302,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<ESCylinderFillingRecordDto> list = new LinkedList<>(); List<ESCylinderFillingRecordDto> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits()) {
System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class); ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class);
list.add(esCylinderFillingRecordDto1); list.add(esCylinderFillingRecordDto1);
...@@ -352,6 +313,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -352,6 +313,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle); result.setTotal(totle);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
} }
return result; return result;
...@@ -362,7 +329,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -362,7 +329,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>(); List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>();
for (ESCylinderFillingRecordDto record : records) { for (ESCylinderFillingRecordDto record : records) {
CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord(); CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord();
BeanUtils.copyProperties(record,cylinderFillingRecord); BeanUtils.copyProperties(record, cylinderFillingRecord);
cylinderFillingRecord.setIsNotEs("1"); cylinderFillingRecord.setIsNotEs("1");
cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr()); cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr());
cylinderFillingRecordList.add(cylinderFillingRecord); cylinderFillingRecordList.add(cylinderFillingRecord);
......
...@@ -25,17 +25,9 @@ import com.yeejoin.amos.feign.systemctl.Systemctl; ...@@ -25,17 +25,9 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
...@@ -136,18 +128,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -136,18 +128,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
@Value("${cylinder-early-warning-packageId:气瓶消息预警/cylwarningmsg}") @Value("${cylinder-early-warning-packageId:气瓶消息预警/cylwarningmsg}")
private String cylPackageId; private String cylPackageId;
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
@Autowired @Autowired
StartPlatformTokenService startPlatformTokenService; StartPlatformTokenService startPlatformTokenService;
...@@ -760,27 +742,6 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -760,27 +742,6 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
public Page<ESCylinderInfoDto> queryByKeys(CylinderInfoDto cylinderInfoDto, int pageNum, int pageSize) { public Page<ESCylinderInfoDto> queryByKeys(CylinderInfoDto cylinderInfoDto, int pageNum, int pageSize) {
Page<ESCylinderInfoDto> result = new Page<ESCylinderInfoDto>(pageNum, pageSize); Page<ESCylinderInfoDto> result = new Page<ESCylinderInfoDto>(pageNum, pageSize);
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient =new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress,esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
// RestHighLevelClient esClient = new RestHighLevelClient(
// RestClient.builder(new HttpHost(esAddress, esPort, "http"))
// );
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("cylinder_info"); request.indices("cylinder_info");
...@@ -906,9 +867,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -906,9 +867,8 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
List<ESCylinderInfoDto> list = new LinkedList<>(); List<ESCylinderInfoDto> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits()) {
System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
ESCylinderInfoDto esCylinderInfoDto = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderInfoDto.class); ESCylinderInfoDto esCylinderInfoDto = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderInfoDto.class);
list.add(esCylinderInfoDto); list.add(esCylinderInfoDto);
...@@ -918,6 +878,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -918,6 +878,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
result.setTotal(totle); result.setTotal(totle);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
}finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
} }
return result; return result;
......
#DB properties: #DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:23306/tzs_amos_tzs_biz_init?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:vastbase://192.168.249.180:54321/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://192.168.249.13:10001/eureka/,http://192.168.249.139:10001/eureka/
#eureka properties: eureka.instance.prefer-ip-address=true
eureka.instance.hostname= eureka eureka.instance.ip-address=192.168.249.13
eureka.instance.prefer-ip-address = true management.endpoint.health.show-details=always
eureka.client.serviceUrl.defaultZone =http://36.46.151.113:10001/eureka/ management.endpoints.web.exposure.include=*
eureka.instance.ip-address = 172.16.3.133 eureka.instance.health-check-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/doc.html
## ES properties: ## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=docker-cluster
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username=elastic elasticsearch.username=elastic
elasticsearch.password=123456 elasticsearch.password=Yeejoin@2023
spring.elasticsearch.rest.uris=http://192.168.249.218:9200,http://192.168.249.114:9200,http://192.168.249.155:9200
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 #集群环境
spring.redis.host=36.46.151.113 spring.redis.cluster.nodes=192.168.249.218:6377,192.168.249.114:6377,192.168.249.155:6377
spring.redis.port=16379 spring.redis.password=Yeejoin@2023
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200 spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1 spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883 emqx.broker=tcp://192.168.249.180:2883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatTokenls
##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id
## \u9884\u8B66\u901A\u77E5\u6A21\u677Fid
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\u7763\u67E5\u6574\u6539\u901A\u77E5 ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
## \u516C\u4F17\u53F7\u6D4B\u8BD5\u7528\u6237id\uFF08\u5E73\u53F0userId\uFF09
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties
fileserver.domain=https://rpm.yeeamos.com:8888/
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://192.168.249.180:19000/
log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs
rule.definition.local-ip=192.168.249.13
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ?
# ??????????
minio.url.path=http://192.168.249.180:19000/
## 生成监管码前缀域名
regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://172.16.10.90:53306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.99:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.99:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=172.16.10.90
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= Yeejoin@2020
## unit(h)
alertcall.es.synchrony.time=48
fileserver.domain=https://rpm.yeeamos.com:8888/
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.10.90
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.90:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://172.16.10.90:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.jczs.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
org.filter.group.seq=1564150103147573249
duty.seats.role.ids=1585956200472674305,1585956257590706177
\ No newline at end of file
#DB properties: #DB properties:
spring.datasource.driver-class-name=cn.com.vastbase.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.username=admin spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://172.16.10.230:10001/eureka/
#DB properties:
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://172.16.10.230:53306/${TZS_BIZ_DATABASE}?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
#spring.datasource.username=${MYSQL_ROOT_USER}
#spring.datasource.password=${MYSQL_ROOT_PASSWORD}
#eureka prioperties:
#eureka.client.serviceUrl.defaultZone=http://172.16.10.230:10001/eureka/
#eureka.client.register-with-eureka=true
#eureka.client.fetch-registry=true
#eureka.client.healthcheck.enabled=true
#ribbon.eureka.enabled=true
#eureka.instance.hostname=${spring.cloud.client.ip-address}
#eureka.instance.prefer-ip-address=true
#eureka.instance.instance-id=${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
#eureka.instance.lease-expiration-duration-in-seconds=10
#eureka.instance.lease-renewal-interval-in-seconds=5
#management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
#
#eureka.instance.prefer-ip-address = true
#eureka.instance.ip-address = 172.16.10.230
eureka.client.service-url.defaultZone =http://172.16.10.230:10001/eureka/
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
...@@ -36,25 +11,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl ...@@ -36,25 +11,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address=172.16.3.34
eureka.instance.ip-address = 172.16.3.34
## ES properties: ## ES properties:
biz.elasticsearch.port=9200 elasticsearch.username=elastic
biz.elasticsearch.address=172.16.10.230 elasticsearch.password=a123456
spring.data.elasticsearch.cluster-name=docker-cluster spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= a123456
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.10.230 spring.redis.host=172.16.10.230
...@@ -65,7 +28,6 @@ spring.redis.lettuce.pool.max-wait=-1 ...@@ -65,7 +28,6 @@ spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
...@@ -73,20 +35,13 @@ emqx.broker=tcp://36.46.151.113:1883 ...@@ -73,20 +35,13 @@ emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.41.172.83:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatToken ##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -96,67 +51,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -96,67 +51,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id ## ??????id
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##?????? ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId? ## ???????id???userId?
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties ##new properties
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://172.16.10.230:19000/ fileserver.domain=http://172.16.10.230:19000/
log.level=INFO log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties: ## ???? properties:
rule.definition.load=false rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto ##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs rule.definition.default-agency=tzs
rule.definition.local-ip=172.16.10.230 rule.definition.local-ip=172.16.10.230
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ? tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ? tzs.cylinder.info.cron=0 0 1 * * ?
# ?????????? # ??????????
minio.url.path=http://172.16.10.230:9000/ minio.url.path=http://172.16.10.230:9000/
## ɼǰ׺ ## ɼǰ׺
regulatory_code_prefix=https://nav.sspai.top/tzs?code= regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560 outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://113.134.211.174:3306/xiy_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.28:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://192.168.1.10:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.3.28
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.28:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.jczs.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:13306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=36.46.151.113
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名--> <!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/cylinder.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern> <FileNamePattern>${LOG_HOME}/Tcm.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<MaxHistory>30</MaxHistory> <MaxHistory>30</MaxHistory>
<!--日志文件大小--> <!--日志文件大小-->
...@@ -37,20 +37,20 @@ ...@@ -37,20 +37,20 @@
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" /> <logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
--> -->
<!--myibatis log configure--> <!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/> <logger name="com.apache.ibatis" level="debug"/>
<logger name="org.mybatis" level="INFO" /> <logger name="org.mybatis" level="debug" />
<logger name="java.sql.Connection" level="INFO"/> <logger name="java.sql.Connection" level="debug"/>
<logger name="java.sql.Statement" level="INFO"/> <logger name="java.sql.Statement" level="debug"/>
<logger name="java.sql.PreparedStatement" level="INFO"/> <logger name="java.sql.PreparedStatement" level="debug"/>
<logger name="org.springframework" level="INFO"/> <logger name="org.springframework" level="debug"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/> <logger name="com.baomidou.mybatisplus" level="debug"/>
<logger name="org.apache.activemq" level="INFO"/> <logger name="org.apache.activemq" level="debug"/>
<logger name="org.typroject" level="INFO"/> <logger name="org.typroject" level="debug"/>
<logger name="com.yeejoin" level="INFO"/> <logger name="com.yeejoin" level="debug"/>
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="DEBUG"> <root level="error">
<!-- <appender-ref ref="FILE" /> --> <!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />--> <!-- <appender-ref ref="ELK" />-->
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/jczs.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- ELK管理 -->
<appender name="ELK" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>172.16.10.230:4560</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/>
<logger name="org.mybatis" level="INFO" />
<logger name="java.sql.Connection" level="INFO"/>
<logger name="java.sql.Statement" level="INFO"/>
<logger name="java.sql.PreparedStatement" level="INFO"/>
<logger name="org.springframework" level="INFO"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="INFO"/>
<logger name="com.yeejoin" level="INFO"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />-->
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/jczs.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/jczs.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
package com.yeejoin.amos.boot.module.tcm.biz.config; package com.yeejoin.amos.boot.module.tcm.biz.config;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope; import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider; import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
...@@ -15,6 +12,7 @@ import org.springframework.beans.factory.annotation.Qualifier; ...@@ -15,6 +12,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration @Configuration
public class ElasticSearchClientConfig { public class ElasticSearchClientConfig {
...@@ -28,34 +26,25 @@ public class ElasticSearchClientConfig { ...@@ -28,34 +26,25 @@ public class ElasticSearchClientConfig {
private String password; private String password;
@Bean @Bean
@Qualifier("highLevelClient")
public RestHighLevelClient restHighLevelClient() { public RestHighLevelClient restHighLevelClient() {
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(username, password)); new UsernamePasswordCredentials(username, password));
try { try {
String url = uris.replace("http://", ""); HttpHost[] httpHosts = Arrays.stream(uris.split(",")).map(HttpHost::create).toArray(HttpHost[]::new);
final String[] parts = StringUtils.split(url, ":"); RestClientBuilder builder = RestClient.builder(httpHosts);
HttpHost httpHost = new HttpHost(parts[0], Integer.parseInt(parts[1]), "http"); builder.setHttpClientConfigCallback(httpClientBuilder -> {
RestClientBuilder builder = RestClient.builder(httpHost); httpClientBuilder.disableAuthCaching();
builder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() { return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
@Override });
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) { // 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
httpClientBuilder.disableAuthCaching(); builder.setRequestConfigCallback(requestConfigBuilder -> {
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider); // 连接超时(默认为1秒)
} return requestConfigBuilder.setConnectTimeout(5000 * 1000)
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
.setSocketTimeout(6000 * 1000);
}); });
builder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
public RequestConfig.Builder customizeRequestConfig(
RequestConfig.Builder requestConfigBuilder) {
return requestConfigBuilder.setConnectTimeout(5000 * 1000) // 连接超时(默认为1秒)
.setSocketTimeout(6000 * 1000);// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
}
});// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
return new RestHighLevelClient(builder); return new RestHighLevelClient(builder);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -122,6 +122,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -122,6 +122,9 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
private String code; private String code;
@Autowired @Autowired
RestHighLevelClient restHighLevelClient;
@Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
//管辖机构redis缓存key //管辖机构redis缓存key
private static final String REGULATOR_UNIT_TREE = "REGULATOR_UNIT_TREE"; private static final String REGULATOR_UNIT_TREE = "REGULATOR_UNIT_TREE";
...@@ -148,17 +151,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -148,17 +151,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//一码通复制功能url参数key //一码通复制功能url参数key
private static final String COPY_KEY = "stashType"; private static final String COPY_KEY = "stashType";
@Value("${biz.elasticsearch.address}")
private String esAddress;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
private static String USE_CODE = "use_code"; private static String USE_CODE = "use_code";
...@@ -1200,11 +1192,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1200,11 +1192,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
return save; return save;
} }
public Page<JSONObject> queryByKeys(JSONObject map) { public Page<JSONObject> queryByKeys(JSONObject map) {
//根据当前登录人查询 // //根据当前登录人查询
if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) { if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) {
map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString()); map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString());
} }
ResponseModel<Page<Map<String, Object>>> model = new ResponseModel<>();
JSONObject object = getCompanyType().get(0); JSONObject object = getCompanyType().get(0);
String level = object.getString("level"); String level = object.getString("level");
String code = object.getString("orgCode"); String code = object.getString("orgCode");
...@@ -1219,19 +1210,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1219,19 +1210,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
} }
Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size")); Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size"));
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient = new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress, esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
SearchSourceBuilder builder = new SearchSourceBuilder(); SearchSourceBuilder builder = new SearchSourceBuilder();
...@@ -1329,7 +1307,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1329,7 +1307,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<JSONObject> list = new LinkedList<>(); List<JSONObject> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) {
System.out.println(hit); System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
...@@ -1348,7 +1326,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1348,7 +1326,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
throw new RuntimeException(e); throw new RuntimeException(e);
} finally { } finally {
try { try {
esClient.close(); restHighLevelClient.close();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -10,25 +10,15 @@ import com.yeejoin.amos.boot.module.tcm.flc.api.dto.CylinderFillingRecordDto; ...@@ -10,25 +10,15 @@ import com.yeejoin.amos.boot.module.tcm.flc.api.dto.CylinderFillingRecordDto;
import com.yeejoin.amos.boot.module.tcm.flc.api.entity.CylinderFillingRecord; import com.yeejoin.amos.boot.module.tcm.flc.api.entity.CylinderFillingRecord;
import com.yeejoin.amos.boot.module.tcm.flc.api.mapper.CylinderFillingRecordMapper; import com.yeejoin.amos.boot.module.tcm.flc.api.mapper.CylinderFillingRecordMapper;
import com.yeejoin.amos.boot.module.tcm.flc.api.service.ICylinderFillingRecordService; import com.yeejoin.amos.boot.module.tcm.flc.api.service.ICylinderFillingRecordService;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
...@@ -55,17 +45,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -55,17 +45,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Autowired @Autowired
CylinderFillingRecordMapper cylinderFillingRecordMapper; CylinderFillingRecordMapper cylinderFillingRecordMapper;
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
/** /**
* 分页查询 * 分页查询
...@@ -127,7 +108,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -127,7 +108,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
//@Scheduled(cron = "${tzs.cylinder.fill.cron}") //@Scheduled(cron = "${tzs.cylinder.fill.cron}")
public void setTimeSaveCylinderInfoToES(){ public void setTimeSaveCylinderInfoToES() {
Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>(); Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>();
Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
Long count = cyinderInfoList.getCurrent(); Long count = cyinderInfoList.getCurrent();
...@@ -143,10 +124,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -143,10 +124,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
cylinderFillingRecordPage.setCurrent(i); cylinderFillingRecordPage.setCurrent(i);
cylinderFillingRecordPage.setSize(1000); cylinderFillingRecordPage.setSize(1000);
cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
cylinderFillingRecordPage.getRecords().stream().map(item->{ cylinderFillingRecordPage.getRecords().stream().map(item -> {
if(!ObjectUtils.isEmpty(item.getSequenceCode())){ if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(),item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
item.setUnitName(cyinderFillingRecordInfo.getUnitName()); item.setUnitName(cyinderFillingRecordInfo.getUnitName());
item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum()); item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum());
item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety()); item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety());
...@@ -164,7 +145,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -164,7 +145,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
// for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) { // for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) {
// saveCylinderFillingRecordToES(ci); // saveCylinderFillingRecordToES(ci);
// } // }
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords()); saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords());
} }
} }
...@@ -174,7 +155,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -174,7 +155,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Override @Override
public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) { public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) {
Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto); Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto);
if(!ObjectUtils.isEmpty(cyinderFillingRecord)){ if (!ObjectUtils.isEmpty(cyinderFillingRecord)) {
cyinderFillingRecord.getRecords().stream().map(item -> { cyinderFillingRecord.getRecords().stream().map(item -> {
if (!ObjectUtils.isEmpty(item.getSequenceCode())) { if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
...@@ -203,25 +184,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -203,25 +184,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize); Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize);
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient =new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress,esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
// RestHighLevelClient esClient = new RestHighLevelClient(
// RestClient.builder(new HttpHost(esAddress, esPort, "http"))
// );
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("cylinder_filling"); request.indices("cylinder_filling");
...@@ -328,7 +290,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -328,7 +290,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
boolMust.must(query); boolMust.must(query);
} }
if(flag) { // 搜索全部 if (flag) { // 搜索全部
boolMust.must(QueryBuilders.matchAllQuery()); boolMust.must(QueryBuilders.matchAllQuery());
} }
...@@ -340,7 +302,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -340,7 +302,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<ESCylinderFillingRecordDto> list = new LinkedList<>(); List<ESCylinderFillingRecordDto> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits()) {
System.out.println(hit); System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
...@@ -352,6 +314,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -352,6 +314,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle); result.setTotal(totle);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
} }
return result; return result;
...@@ -362,7 +330,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -362,7 +330,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>(); List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>();
for (ESCylinderFillingRecordDto record : records) { for (ESCylinderFillingRecordDto record : records) {
CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord(); CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord();
BeanUtils.copyProperties(record,cylinderFillingRecord); BeanUtils.copyProperties(record, cylinderFillingRecord);
cylinderFillingRecord.setIsNotEs("1"); cylinderFillingRecord.setIsNotEs("1");
cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr()); cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr());
cylinderFillingRecordList.add(cylinderFillingRecord); cylinderFillingRecordList.add(cylinderFillingRecord);
......
#DB properties: #DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:23306/tzs_amos_tzs_biz_init?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:vastbase://192.168.249.180:54321/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://192.168.249.13:10001/eureka/,http://192.168.249.139:10001/eureka/
#eureka properties: eureka.instance.prefer-ip-address=true
eureka.instance.hostname= eureka eureka.instance.ip-address=192.168.249.13
eureka.instance.prefer-ip-address = true management.endpoint.health.show-details=always
eureka.client.serviceUrl.defaultZone =http://36.46.151.113:10001/eureka/ management.endpoints.web.exposure.include=*
eureka.instance.ip-address = 172.16.3.133 eureka.instance.health-check-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/doc.html
## ES properties: ## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=docker-cluster
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username=elastic elasticsearch.username=elastic
elasticsearch.password=123456 elasticsearch.password=Yeejoin@2023
spring.elasticsearch.rest.uris=http://192.168.249.218:9200,http://192.168.249.114:9200,http://192.168.249.155:9200
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 #集群环境
spring.redis.host=36.46.151.113 spring.redis.cluster.nodes=192.168.249.218:6377,192.168.249.114:6377,192.168.249.155:6377
spring.redis.port=16379 spring.redis.password=Yeejoin@2023
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200 spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1 spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883 emqx.broker=tcp://192.168.249.180:2883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatTokenls
##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id
## \u9884\u8B66\u901A\u77E5\u6A21\u677Fid
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\u7763\u67E5\u6574\u6539\u901A\u77E5 ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
## \u516C\u4F17\u53F7\u6D4B\u8BD5\u7528\u6237id\uFF08\u5E73\u53F0userId\uFF09
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties
fileserver.domain=https://rpm.yeeamos.com:8888/
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://192.168.249.180:19000/
log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs
rule.definition.local-ip=192.168.249.13
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ?
# ??????????
minio.url.path=http://192.168.249.180:19000/
## 生成监管码前缀域名
regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://172.16.10.90:53306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.99:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.99:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=172.16.10.90
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= Yeejoin@2020
## unit(h)
alertcall.es.synchrony.time=48
fileserver.domain=https://rpm.yeeamos.com:8888/
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.10.90
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.90:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://172.16.10.90:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
org.filter.group.seq=1564150103147573249
duty.seats.role.ids=1585956200472674305,1585956257590706177
\ No newline at end of file
#DB properties: #DB properties:
spring.datasource.driver-class-name=cn.com.vastbase.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.username=admin spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023 spring.datasource.password=Yeejoin@2023
#DB properties: eureka.client.service-url.defaultZone=http://172.16.10.230:10001/eureka/
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://172.16.10.230:53306/${TZS_BIZ_DATABASE}?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
#spring.datasource.username=${MYSQL_ROOT_USER}
#spring.datasource.password=${MYSQL_ROOT_PASSWORD}
#eureka prioperties:
#eureka.client.serviceUrl.defaultZone=http://172.16.10.230:10001/eureka/
#eureka.client.register-with-eureka=true
#eureka.client.fetch-registry=true
#eureka.client.healthcheck.enabled=true
#ribbon.eureka.enabled=true
#eureka.instance.hostname=${spring.cloud.client.ip-address}
#eureka.instance.prefer-ip-address=true
#eureka.instance.instance-id=${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
#eureka.instance.lease-expiration-duration-in-seconds=10
#eureka.instance.lease-renewal-interval-in-seconds=5
#management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
#
#eureka.instance.prefer-ip-address = true
#eureka.instance.ip-address = 172.16.10.230
eureka.client.service-url.defaultZone =http://172.16.10.230:10001/eureka/
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
...@@ -36,25 +12,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl ...@@ -36,25 +12,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address=172.16.3.34
eureka.instance.ip-address = 172.16.3.34
## ES properties: ## ES properties:
biz.elasticsearch.port=9200 elasticsearch.username=elastic
biz.elasticsearch.address=172.16.10.230 elasticsearch.password=a123456
spring.data.elasticsearch.cluster-name=docker-cluster spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= a123456
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.10.230 spring.redis.host=172.16.10.230
...@@ -65,7 +29,6 @@ spring.redis.lettuce.pool.max-wait=-1 ...@@ -65,7 +29,6 @@ spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
...@@ -73,20 +36,13 @@ emqx.broker=tcp://36.46.151.113:1883 ...@@ -73,20 +36,13 @@ emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.41.172.83:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatToken ##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -96,67 +52,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -96,67 +52,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id ## ??????id
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##?????? ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId? ## ???????id???userId?
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties ##new properties
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://172.16.10.230:19000/ fileserver.domain=http://172.16.10.230:19000/
log.level=INFO log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties: ## ???? properties:
rule.definition.load=false rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto ##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs rule.definition.default-agency=tzs
rule.definition.local-ip=172.16.10.230 rule.definition.local-ip=172.16.10.230
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ? tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ? tzs.cylinder.info.cron=0 0 1 * * ?
# ?????????? # ??????????
minio.url.path=http://172.16.10.230:9000/ minio.url.path=http://172.16.10.230:9000/
## ɼǰ׺ ## ɼǰ׺
regulatory_code_prefix=https://nav.sspai.top/tzs?code= regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560 outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://113.134.211.174:3306/xiy_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.28:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://192.168.1.10:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.3.28
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.28:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:13306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=36.46.151.113
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
spring.application.name=TZS-COMMON spring.application.name=TZS-COMMON-SHG
server.servlet.context-path=/tcm server.servlet.context-path=/tcm
server.port=11001 server.port=11002
spring.profiles.active=dev3 spring.profiles.active=dev3
#最大等待队列长度,默认100 #最大等待队列长度,默认100
server.tomcat.accept-count=1000 server.tomcat.accept-count=1000
...@@ -11,7 +11,7 @@ server.tomcat.threads.max=800 ...@@ -11,7 +11,7 @@ server.tomcat.threads.max=800
#最小线程数,默认10 #最小线程数,默认10
server.tomcat.threads.min-spare=100 server.tomcat.threads.min-spare=100
logging.level.net.javacrumbs.shedlock=DEBUG
spring.jackson.time-zone=GMT+8 spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名--> <!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/jczs.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern> <FileNamePattern>${LOG_HOME}/Tcm.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<MaxHistory>30</MaxHistory> <MaxHistory>30</MaxHistory>
<!--日志文件大小--> <!--日志文件大小-->
...@@ -37,20 +37,20 @@ ...@@ -37,20 +37,20 @@
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" /> <logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
--> -->
<!--myibatis log configure--> <!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/> <logger name="com.apache.ibatis" level="debug"/>
<logger name="org.mybatis" level="INFO" /> <logger name="org.mybatis" level="debug" />
<logger name="java.sql.Connection" level="INFO"/> <logger name="java.sql.Connection" level="debug"/>
<logger name="java.sql.Statement" level="INFO"/> <logger name="java.sql.Statement" level="debug"/>
<logger name="java.sql.PreparedStatement" level="INFO"/> <logger name="java.sql.PreparedStatement" level="debug"/>
<logger name="org.springframework" level="INFO"/> <logger name="org.springframework" level="debug"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/> <logger name="com.baomidou.mybatisplus" level="debug"/>
<logger name="org.apache.activemq" level="INFO"/> <logger name="org.apache.activemq" level="debug"/>
<logger name="org.typroject" level="INFO"/> <logger name="org.typroject" level="debug"/>
<logger name="com.yeejoin" level="INFO"/> <logger name="com.yeejoin" level="debug"/>
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="DEBUG"> <root level="error">
<!-- <appender-ref ref="FILE" /> --> <!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />--> <!-- <appender-ref ref="ELK" />-->
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/Tcm.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- ELK管理 -->
<appender name="ELK" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>172.16.10.230:4560</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/>
<logger name="org.mybatis" level="INFO" />
<logger name="java.sql.Connection" level="INFO"/>
<logger name="java.sql.Statement" level="INFO"/>
<logger name="java.sql.PreparedStatement" level="INFO"/>
<logger name="org.springframework" level="INFO"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="INFO"/>
<logger name="com.yeejoin" level="INFO"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />-->
</root>
</configuration>
\ No newline at end of file
...@@ -37,20 +37,20 @@ ...@@ -37,20 +37,20 @@
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" /> <logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
--> -->
<!--myibatis log configure--> <!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/> <logger name="com.apache.ibatis" level="debug"/>
<logger name="org.mybatis" level="INFO" /> <logger name="org.mybatis" level="debug" />
<logger name="java.sql.Connection" level="INFO"/> <logger name="java.sql.Connection" level="debug"/>
<logger name="java.sql.Statement" level="INFO"/> <logger name="java.sql.Statement" level="debug"/>
<logger name="java.sql.PreparedStatement" level="INFO"/> <logger name="java.sql.PreparedStatement" level="debug"/>
<logger name="org.springframework" level="INFO"/> <logger name="org.springframework" level="debug"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/> <logger name="com.baomidou.mybatisplus" level="debug"/>
<logger name="org.apache.activemq" level="INFO"/> <logger name="org.apache.activemq" level="debug"/>
<logger name="org.typroject" level="INFO"/> <logger name="org.typroject" level="debug"/>
<logger name="com.yeejoin" level="INFO"/> <logger name="com.yeejoin" level="debug"/>
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="DEBUG"> <root level="debug">
<!-- <appender-ref ref="FILE" /> --> <!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />--> <!-- <appender-ref ref="ELK" />-->
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/Tcm.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/Tcm.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="DEBUG"/>
<logger name="org.mybatis" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<logger name="org.springframework" level="DEBUG"/>
<logger name="com.baomidou.mybatisplus" level="DEBUG"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="DEBUG"/>
<logger name="com.yeejoin" level="DEBUG"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
package com.yeejoin.amos.boot.module.ymt.biz.config; package com.yeejoin.amos.boot.module.ymt.biz.config;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope; import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider; import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -16,6 +13,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration @Configuration
public class ElasticSearchClientConfig { public class ElasticSearchClientConfig {
...@@ -35,27 +34,19 @@ public class ElasticSearchClientConfig { ...@@ -35,27 +34,19 @@ public class ElasticSearchClientConfig {
new UsernamePasswordCredentials(username, password)); new UsernamePasswordCredentials(username, password));
try { try {
String url = uris.replace("http://", ""); HttpHost[] httpHosts = Arrays.stream(uris.split(",")).map(HttpHost::create).toArray(HttpHost[]::new);
final String[] parts = StringUtils.split(url, ":"); RestClientBuilder builder = RestClient.builder(httpHosts);
HttpHost httpHost = new HttpHost(parts[0], Integer.parseInt(parts[1]), "http"); builder.setHttpClientConfigCallback(httpClientBuilder -> {
RestClientBuilder builder = RestClient.builder(httpHost); httpClientBuilder.disableAuthCaching();
builder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() { return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
@Override });
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) { // 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
httpClientBuilder.disableAuthCaching(); builder.setRequestConfigCallback(requestConfigBuilder -> {
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider); // 连接超时(默认为1秒)
} return requestConfigBuilder.setConnectTimeout(5000 * 1000)
// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
.setSocketTimeout(6000 * 1000);
}); });
builder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
// 该方法接收一个RequestConfig.Builder对象,对该对象进行修改后然后返回。
@Override
public RequestConfig.Builder customizeRequestConfig(
RequestConfig.Builder requestConfigBuilder) {
return requestConfigBuilder.setConnectTimeout(5000 * 1000) // 连接超时(默认为1秒)
.setSocketTimeout(6000 * 1000);// 套接字超时(默认为30秒)//更改客户端的超时限制默认30秒现在改为100*1000分钟
}
});// 调整最大重试超时时间(默认为30秒).setMaxRetryTimeoutMillis(60000);
return new RestHighLevelClient(builder); return new RestHighLevelClient(builder);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -158,17 +158,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -158,17 +158,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//一码通复制功能url参数key //一码通复制功能url参数key
private static final String COPY_KEY = "stashType"; private static final String COPY_KEY = "stashType";
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
private static String USE_CODE = "use_code"; private static String USE_CODE = "use_code";
...@@ -1185,11 +1176,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1185,11 +1176,10 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
public Page<JSONObject> queryByKeys(JSONObject map) { public Page<JSONObject> queryByKeys(JSONObject map) {
//根据当前登录人查询 // //根据当前登录人查询
if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) { if (!ValidationUtil.isEmpty(map.get(EQUSTATE))) {
map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString()); map.put(EQUSTATE, EquimentEnum.getCode.get(map.get(EQUSTATE).toString()).toString());
} }
ResponseModel<Page<Map<String, Object>>> model = new ResponseModel<>();
JSONObject object = getCompanyType().get(0); JSONObject object = getCompanyType().get(0);
String level = object.getString("level"); String level = object.getString("level");
String code = object.getString("orgCode"); String code = object.getString("orgCode");
...@@ -1204,19 +1194,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1204,19 +1194,6 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
} }
Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size")); Page<JSONObject> result = new Page<>(map.getInteger("number"), map.getInteger("size"));
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient = new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress, esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
SearchSourceBuilder builder = new SearchSourceBuilder(); SearchSourceBuilder builder = new SearchSourceBuilder();
...@@ -1226,12 +1203,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1226,12 +1203,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//SEQUENCE_NBR //SEQUENCE_NBR
if (!ObjectUtils.isEmpty(map.getString("SEQUENCE_NBR"))) { if (!ObjectUtils.isEmpty(map.getString("SEQUENCE_NBR"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.matchPhraseQuery("SEQUENCE_NBR", "*" + map.getString("SEQUENCE_NBR") + "*")); meBuilder.must(QueryBuilders.matchPhraseQuery("SEQUENCE_NBR", "*"+map.getString("SEQUENCE_NBR")+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_NAME"))) { if (!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_NAME"))) {
BoolQueryBuilder query = QueryBuilders.boolQuery(); BoolQueryBuilder query = QueryBuilders.boolQuery();
query.must(QueryBuilders.matchPhraseQuery("ORG_BRANCH_NAME", "*" + map.getString("ORG_BRANCH_NAME") + "*")); query.must(QueryBuilders.matchPhraseQuery("ORG_BRANCH_NAME", "*"+map.getString("ORG_BRANCH_NAME")+"*" ));
boolMust.must(query); boolMust.must(query);
} }
if (!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))) {
...@@ -1241,12 +1218,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1241,12 +1218,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_NAME"))) { if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_NAME"))) {
BoolQueryBuilder query = QueryBuilders.boolQuery(); BoolQueryBuilder query = QueryBuilders.boolQuery();
query.must(QueryBuilders.matchPhraseQuery("USE_UNIT_NAME", "*" + map.getString("USE_UNIT_NAME") + "*")); query.must(QueryBuilders.matchPhraseQuery("USE_UNIT_NAME", "*"+map.getString("USE_UNIT_NAME")+"*"));
boolMust.must(query); boolMust.must(query);
} }
if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.matchPhraseQuery("USE_UNIT_CREDIT_CODE", "*" + map.getString("USE_UNIT_CREDIT_CODE") + "*")); meBuilder.must(QueryBuilders.matchPhraseQuery("USE_UNIT_CREDIT_CODE", "*"+map.getString("USE_UNIT_CREDIT_CODE")+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) {
...@@ -1256,23 +1233,23 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1256,23 +1233,23 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_LIST"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_LIST", "*" + map.getString("EQU_LIST") + "*")); meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_LIST", "*"+map.getString("EQU_LIST")+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_CATEGORY", "*" + map.getString("EQU_CATEGORY") + "*")); meBuilder.must(QueryBuilders.matchPhraseQuery("EQU_CATEGORY", "*"+map.getString("EQU_CATEGORY")+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("USE_ORG_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("USE_ORG_CODE"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*" + map.getString("USE_ORG_CODE").toLowerCase() + "*")); meBuilder.must(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"+map.getString("USE_ORG_CODE").toLowerCase()+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("CODE96333"))) { if (!ObjectUtils.isEmpty(map.getString("CODE96333"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.wildcardQuery("CODE96333", "*" + map.getString("CODE96333").toLowerCase() + "*")); meBuilder.must(QueryBuilders.wildcardQuery("CODE96333", "*"+map.getString("CODE96333").toLowerCase()+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("EQU_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_CODE"))) {
...@@ -1283,7 +1260,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1283,7 +1260,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if (!ObjectUtils.isEmpty(map.getString("SUPERVISORY_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("SUPERVISORY_CODE"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.wildcardQuery("SUPERVISORY_CODE", "*" + map.getString("SUPERVISORY_CODE").toLowerCase() + "*")); meBuilder.must(QueryBuilders.wildcardQuery("SUPERVISORY_CODE", "*"+map.getString("SUPERVISORY_CODE").toLowerCase()+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("USE_PLACE"))) { if (!ObjectUtils.isEmpty(map.getString("USE_PLACE"))) {
...@@ -1296,14 +1273,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1296,14 +1273,14 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
query.must(QueryBuilders.matchPhraseQuery("ADDRESS", "*" + map.getString("ADDRESS") + "*")); query.must(QueryBuilders.matchPhraseQuery("ADDRESS", "*" + map.getString("ADDRESS") + "*"));
boolMust.must(query); boolMust.must(query);
} }
if (!ObjectUtils.isEmpty(map.getString("EQU_STATE"))) { if (!ObjectUtils.isEmpty(map.getString("EQU_STATE")) ) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.matchQuery("EQU_STATE", map.getLong("EQU_STATE"))); meBuilder.must(QueryBuilders.matchQuery("EQU_STATE", map.getLong("EQU_STATE")));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("STATUS"))) { if (!ObjectUtils.isEmpty(map.getString("STATUS"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", "*" + map.getString("STATUS") + "*")); meBuilder.must(QueryBuilders.matchPhraseQuery("STATUS", "*"+map.getString("STATUS")+"*"));
boolMust.must(meBuilder); boolMust.must(meBuilder);
} }
builder.query(boolMust); builder.query(boolMust);
...@@ -1314,7 +1291,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1314,7 +1291,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
List<JSONObject> list = new LinkedList<>(); List<JSONObject> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) {
System.out.println(hit); System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
...@@ -1333,7 +1310,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1333,7 +1310,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
throw new RuntimeException(e); throw new RuntimeException(e);
} finally { } finally {
try { try {
esClient.close(); restHighLevelClient.close();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
...@@ -10,24 +10,15 @@ import com.yeejoin.amos.boot.module.ymt.flc.api.dto.CylinderFillingRecordDto; ...@@ -10,24 +10,15 @@ import com.yeejoin.amos.boot.module.ymt.flc.api.dto.CylinderFillingRecordDto;
import com.yeejoin.amos.boot.module.ymt.flc.api.entity.CylinderFillingRecord; import com.yeejoin.amos.boot.module.ymt.flc.api.entity.CylinderFillingRecord;
import com.yeejoin.amos.boot.module.ymt.flc.api.mapper.CylinderFillingRecordMapper; import com.yeejoin.amos.boot.module.ymt.flc.api.mapper.CylinderFillingRecordMapper;
import com.yeejoin.amos.boot.module.ymt.flc.api.service.ICylinderFillingRecordService; import com.yeejoin.amos.boot.module.ymt.flc.api.service.ICylinderFillingRecordService;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient; import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -55,17 +46,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -55,17 +46,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Autowired @Autowired
CylinderFillingRecordMapper cylinderFillingRecordMapper; CylinderFillingRecordMapper cylinderFillingRecordMapper;
@Value("${biz.elasticsearch.address}") @Autowired
private String esAddress; RestHighLevelClient restHighLevelClient;
@Value("${biz.elasticsearch.port}")
private Integer esPort;
@Value("${elasticsearch.username}")
private String esUserName;
@Value("${elasticsearch.password}")
private String esPwd;
/** /**
* 分页查询 * 分页查询
...@@ -127,7 +109,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -127,7 +109,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Scheduled(cron = "${tzs.cylinder.fill.cron}") @Scheduled(cron = "${tzs.cylinder.fill.cron}")
public void setTimeSaveCylinderInfoToES(){ public void setTimeSaveCylinderInfoToES() {
Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>(); Page<ESCylinderFillingRecordDto> cylinderFillingRecordPage = new Page<>();
Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); Page<ESCylinderFillingRecordDto> cyinderInfoList = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
Long count = cyinderInfoList.getCurrent(); Long count = cyinderInfoList.getCurrent();
...@@ -143,10 +125,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -143,10 +125,10 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
cylinderFillingRecordPage.setCurrent(i); cylinderFillingRecordPage.setCurrent(i);
cylinderFillingRecordPage.setSize(1000); cylinderFillingRecordPage.setSize(1000);
cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage); cylinderFillingRecordPage = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordPage);
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
cylinderFillingRecordPage.getRecords().stream().map(item->{ cylinderFillingRecordPage.getRecords().stream().map(item -> {
if(!ObjectUtils.isEmpty(item.getSequenceCode())){ if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(),item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
item.setUnitName(cyinderFillingRecordInfo.getUnitName()); item.setUnitName(cyinderFillingRecordInfo.getUnitName());
item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum()); item.setFactoryNum(cyinderFillingRecordInfo.getFactoryNum());
item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety()); item.setCylinderVariety(cyinderFillingRecordInfo.getCylinderVariety());
...@@ -164,7 +146,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -164,7 +146,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
// for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) { // for (ESCylinderFillingRecordDto ci : cylinderFillingRecordPage.getRecords()) {
// saveCylinderFillingRecordToES(ci); // saveCylinderFillingRecordToES(ci);
// } // }
if(!ObjectUtils.isEmpty(cylinderFillingRecordPage)){ if (!ObjectUtils.isEmpty(cylinderFillingRecordPage)) {
saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords()); saveCylinderFillingRecord2ES(cylinderFillingRecordPage.getRecords());
} }
} }
...@@ -174,7 +156,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -174,7 +156,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Override @Override
public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) { public Page<ESCylinderFillingRecordDto> getCyinderFillingRecord(Page<ESCylinderFillingRecordDto> cylinderFillingRecordDto) {
Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto); Page<ESCylinderFillingRecordDto> cyinderFillingRecord = cylinderFillingRecordMapper.getCyinderFillingRecord(cylinderFillingRecordDto);
if(!ObjectUtils.isEmpty(cyinderFillingRecord)){ if (!ObjectUtils.isEmpty(cyinderFillingRecord)) {
cyinderFillingRecord.getRecords().stream().map(item -> { cyinderFillingRecord.getRecords().stream().map(item -> {
if (!ObjectUtils.isEmpty(item.getSequenceCode())) { if (!ObjectUtils.isEmpty(item.getSequenceCode())) {
ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode()); ESCylinderFillingRecordDto cyinderFillingRecordInfo = cylinderFillingRecordMapper.getCyinderFillingRecordInfo(item.getAppId(), item.getSequenceCode());
...@@ -202,26 +184,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -202,26 +184,6 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) { public Page<ESCylinderFillingRecordDto> queryByKeys(ESCylinderFillingRecordDto esCylinderFillingRecordDto, int pageNum, int pageSize) {
Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize); Page<ESCylinderFillingRecordDto> result = new Page<ESCylinderFillingRecordDto>(pageNum, pageSize);
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY,
new UsernamePasswordCredentials(esUserName, esPwd)); //es账号密码
RestHighLevelClient esClient =new RestHighLevelClient(
RestClient.builder(
new HttpHost(esAddress,esPort)
).setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpClientBuilder) {
httpClientBuilder.disableAuthCaching();
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
}
})
);
// RestHighLevelClient esClient = new RestHighLevelClient(
// RestClient.builder(new HttpHost(esAddress, esPort, "http"))
// );
SearchRequest request = new SearchRequest(); SearchRequest request = new SearchRequest();
request.indices("cylinder_filling"); request.indices("cylinder_filling");
...@@ -328,7 +290,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -328,7 +290,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
boolMust.must(query); boolMust.must(query);
} }
if(flag) { // 搜索全部 if (flag) { // 搜索全部
boolMust.must(QueryBuilders.matchAllQuery()); boolMust.must(QueryBuilders.matchAllQuery());
} }
...@@ -340,9 +302,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -340,9 +302,8 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<ESCylinderFillingRecordDto> list = new LinkedList<>(); List<ESCylinderFillingRecordDto> list = new LinkedList<>();
long totle = 0; long totle = 0;
try { try {
SearchResponse response = esClient.search(request, RequestOptions.DEFAULT); SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits()) { for (org.elasticsearch.search.SearchHit hit : response.getHits()) {
System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit); JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class); ESCylinderFillingRecordDto esCylinderFillingRecordDto1 = JSONObject.toJavaObject(jsonObject.getJSONObject("sourceAsMap"), ESCylinderFillingRecordDto.class);
list.add(esCylinderFillingRecordDto1); list.add(esCylinderFillingRecordDto1);
...@@ -352,6 +313,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -352,6 +313,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
result.setTotal(totle); result.setTotal(totle);
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} finally {
try {
restHighLevelClient.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
} }
return result; return result;
...@@ -362,7 +329,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin ...@@ -362,7 +329,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>(); List<CylinderFillingRecord> cylinderFillingRecordList = new ArrayList<>();
for (ESCylinderFillingRecordDto record : records) { for (ESCylinderFillingRecordDto record : records) {
CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord(); CylinderFillingRecord cylinderFillingRecord = new CylinderFillingRecord();
BeanUtils.copyProperties(record,cylinderFillingRecord); BeanUtils.copyProperties(record, cylinderFillingRecord);
cylinderFillingRecord.setIsNotEs("1"); cylinderFillingRecord.setIsNotEs("1");
cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr()); cylinderFillingRecord.setSequenceNbr(record.getSequenceNbr());
cylinderFillingRecordList.add(cylinderFillingRecord); cylinderFillingRecordList.add(cylinderFillingRecord);
......
#DB properties: #DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:23306/tzs_amos_tzs_biz_init?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:vastbase://192.168.249.180:54321/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://192.168.249.13:10001/eureka/,http://192.168.249.139:10001/eureka/
#eureka properties: eureka.instance.prefer-ip-address=true
eureka.instance.hostname= eureka eureka.instance.ip-address=192.168.249.13
eureka.instance.prefer-ip-address = true management.endpoint.health.show-details=always
eureka.client.serviceUrl.defaultZone =http://36.46.151.113:10001/eureka/ management.endpoints.web.exposure.include=*
eureka.instance.ip-address = 172.16.3.133 eureka.instance.health-check-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://${eureka.instance.ip-address}:${server.port}${server.servlet.context-path}/doc.html
## ES properties: ## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=docker-cluster
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username=elastic elasticsearch.username=elastic
elasticsearch.password=123456 elasticsearch.password=Yeejoin@2023
spring.elasticsearch.rest.uris=http://192.168.249.218:9200,http://192.168.249.114:9200,http://192.168.249.155:9200
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 #集群环境
spring.redis.host=36.46.151.113 spring.redis.cluster.nodes=192.168.249.218:6377,192.168.249.114:6377,192.168.249.155:6377
spring.redis.port=16379 spring.redis.password=Yeejoin@2023
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200 spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1 spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883 emqx.broker=tcp://192.168.249.180:2883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatTokenls
##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -61,41 +50,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id
## \u9884\u8B66\u901A\u77E5\u6A21\u677Fid
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\u7763\u67E5\u6574\u6539\u901A\u77E5 ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
## \u516C\u4F17\u53F7\u6D4B\u8BD5\u7528\u6237id\uFF08\u5E73\u53F0userId\uFF09
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties
fileserver.domain=https://rpm.yeeamos.com:8888/
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://192.168.249.180:19000/
log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs
rule.definition.local-ip=192.168.249.13
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ?
# ??????????
minio.url.path=http://192.168.249.180:19000/
## 生成监管码前缀域名
regulatory_code_prefix=https://nav.sspai.top/tzs?code=
outSystem.user.password=a1234560
amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://172.16.10.90:53306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.99:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.99:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.99:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=172.16.10.90
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= Yeejoin@2020
## unit(h)
alertcall.es.synchrony.time=48
fileserver.domain=https://rpm.yeeamos.com:8888/
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.10.90
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.90:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://172.16.10.90:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
org.filter.group.seq=1564150103147573249
duty.seats.role.ids=1585956200472674305,1585956257590706177
\ No newline at end of file
...@@ -4,31 +4,7 @@ spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?c ...@@ -4,31 +4,7 @@ spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?c
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz #spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.username=admin spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023 spring.datasource.password=Yeejoin@2023
eureka.client.service-url.defaultZone=http://172.16.10.230:10001/eureka/
#DB properties:
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://172.16.10.230:53306/${TZS_BIZ_DATABASE}?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
#spring.datasource.username=${MYSQL_ROOT_USER}
#spring.datasource.password=${MYSQL_ROOT_PASSWORD}
#eureka prioperties:
#eureka.client.serviceUrl.defaultZone=http://172.16.10.230:10001/eureka/
#eureka.client.register-with-eureka=true
#eureka.client.fetch-registry=true
#eureka.client.healthcheck.enabled=true
#ribbon.eureka.enabled=true
#eureka.instance.hostname=${spring.cloud.client.ip-address}
#eureka.instance.prefer-ip-address=true
#eureka.instance.instance-id=${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
#eureka.instance.lease-expiration-duration-in-seconds=10
#eureka.instance.lease-renewal-interval-in-seconds=5
#management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
#
#eureka.instance.prefer-ip-address = true
#eureka.instance.ip-address = 172.16.10.230
eureka.client.service-url.defaultZone =http://172.16.10.230:10001/eureka/
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=* management.endpoints.web.exposure.include=*
...@@ -36,25 +12,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl ...@@ -36,25 +12,13 @@ eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servl
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address=172.16.3.34
eureka.instance.ip-address = 172.16.3.34
## ES properties: ## ES properties:
biz.elasticsearch.port=9200 elasticsearch.username=elastic
biz.elasticsearch.address=172.16.10.230 elasticsearch.password=a123456
spring.data.elasticsearch.cluster-name=docker-cluster spring.elasticsearch.rest.uris=http:/172.16.10.230:9200
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username= elastic
elasticsearch.password= a123456
## unit(h) ## unit(h)
alertcall.es.synchrony.time=48 alertcall.es.synchrony.time=48
#redis properties: #redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.10.230 spring.redis.host=172.16.10.230
...@@ -65,7 +29,6 @@ spring.redis.lettuce.pool.max-wait=-1 ...@@ -65,7 +29,6 @@ spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10 spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0 spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300 spring.redis.expire.time=300
## emqx properties: ## emqx properties:
emqx.clean-session=false emqx.clean-session=false
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
...@@ -73,20 +36,13 @@ emqx.broker=tcp://36.46.151.113:1883 ...@@ -73,20 +36,13 @@ emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=super emqx.user-name=super
emqx.password=123456 emqx.password=123456
emqx.keepAliveInterval=1000 emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.41.172.83:8000 tzs.cti.url=http://36.41.172.83:8000
##wechatToken ##wechatToken
tzs.wechat.token=yeejoin_2021 tzs.wechat.token=yeejoin_2021
##wechatTicketUrl ##wechatTicketUrl
tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token= tzs.wechat.ticketurl=https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=
#tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw #tzs.wechat.tempId.kr=rjW8x9rRitIpa21Jekyx2nzBzpJy7tycssCXSN4YhWw
tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM tzs.wechat.tempId.kr=bxchKYhYW7aHbGKM2pVyR_yY2-bG4sRMNU3ZRQbMKYM
tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html tzs.wechat.url.kr=tzs.yeeamos.com/persondetail.html
...@@ -96,67 +52,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html ...@@ -96,67 +52,41 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU #tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html tzs.wechat.url.ts=tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask=tzs-task-newtask mqtt.topic.task.newtask=tzs-task-newtask
mqtt.topic.task.personinfo=tzs-task-personinfo mqtt.topic.task.personinfo=tzs-task-personinfo
mqtt.topic.elevator.push=/tzs/tcb_elevator mqtt.topic.elevator.push=/tzs/tcb_elevator
mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo mqtt.topic.alertInfo.push=/tzs/tcb_alertInfo
mqtt.topic.alertReport.push=/tzs/tcb_alertReport mqtt.topic.alertReport.push=/tzs/tcb_alertReport
mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart mqtt.topic.alertHeart.push=/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix mqtt.topic.alertMatrix.push=/tzs/tcb_alertMatrix
mqtt.topic.cti.push=/cti/record mqtt.topic.cti.push=/cti/record
cti.user.name=tzs_cti cti.user.name=tzs_cti
cti.user.pwd=a1234567 cti.user.pwd=a1234567
flc.sms.tempCode=SMS_TZS_0001 flc.sms.tempCode=SMS_TZS_0001
## ??????id ## ??????id
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##?????? ##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId? ## ???????id???userId?
tzs.wechat.test.userId=3413513 tzs.wechat.test.userId=3413513
##new properties ##new properties
org.filter.group.seq=1564150103147573249 org.filter.group.seq=1564150103147573249
fileserver.domain=http://172.16.10.230:19000/ fileserver.domain=http://172.16.10.230:19000/
log.level=INFO log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177 duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties: ## ???? properties:
rule.definition.load=false rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto ##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs rule.definition.default-agency=tzs
rule.definition.local-ip=172.16.10.230 rule.definition.local-ip=172.16.10.230
#\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u5145\u88C5\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.fill.cron=0 0 12 * * ? tzs.cylinder.fill.cron=0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es #\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron=0 0 1 * * ? tzs.cylinder.info.cron=0 0 1 * * ?
# ?????????? # ??????????
minio.url.path=http://172.16.10.230:9000/ minio.url.path=http://172.16.10.230:9000/
## ɼǰ׺ ## ɼǰ׺
regulatory_code_prefix=https://sxtzsb.sxsei.com:9435/tzs?code= regulatory_code_prefix=https://sxtzsb.sxsei.com:9435/tzs?code=
#outSystem.user.password=a1234560 #outSystem.user.password=a1234560
#amos.system.user.app-key=AMOS_STUDIO #amos.system.user.app-key=AMOS_STUDIO
#amos.system.user.product=STUDIO_APP_WEB #amos.system.user.product=STUDIO_APP_WEB
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://113.134.211.174:3306/xiy_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://172.16.3.28:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.28:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://192.168.1.10:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=172.16.3.28
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.3.28:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.tzs.api.dto
rule.definition.default-agency=tzs
rule.definition.localIp=172.16.3.39
\ No newline at end of file
#DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://36.46.151.113:13306/tzs_amos_tzs_biz?allowMultiQueries=true&serverTimezone=GMT%2B8\
&characterEncoding=utf8
spring.datasource.username=root
spring.datasource.password=Yeejoin@2020
##eureka properties:
eureka.client.service-url.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## ES properties:
biz.elasticsearch.address=36.46.151.113
spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
## unit(h)
alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=36.46.151.113
spring.redis.port=16379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://36.46.151.113:1883
emqx.user-name=admin
emqx.password=public
tzs.cti.url=http://113.134.211.174:8000
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名--> <!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/ymt.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern> <FileNamePattern>${LOG_HOME}/Tcm.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数--> <!--日志文件保留天数-->
<MaxHistory>30</MaxHistory> <MaxHistory>30</MaxHistory>
<!--日志文件大小--> <!--日志文件大小-->
...@@ -37,20 +37,20 @@ ...@@ -37,20 +37,20 @@
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" /> <logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
--> -->
<!--myibatis log configure--> <!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/> <logger name="com.apache.ibatis" level="debug"/>
<logger name="org.mybatis" level="INFO" /> <logger name="org.mybatis" level="debug" />
<logger name="java.sql.Connection" level="INFO"/> <logger name="java.sql.Connection" level="debug"/>
<logger name="java.sql.Statement" level="INFO"/> <logger name="java.sql.Statement" level="debug"/>
<logger name="java.sql.PreparedStatement" level="INFO"/> <logger name="java.sql.PreparedStatement" level="debug"/>
<logger name="org.springframework" level="INFO"/> <logger name="org.springframework" level="debug"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/> <logger name="com.baomidou.mybatisplus" level="debug"/>
<logger name="org.apache.activemq" level="INFO"/> <logger name="org.apache.activemq" level="debug"/>
<logger name="org.typroject" level="INFO"/> <logger name="org.typroject" level="debug"/>
<logger name="com.yeejoin" level="INFO"/> <logger name="com.yeejoin" level="debug"/>
<!-- 日志输出级别 --> <!-- 日志输出级别 -->
<root level="DEBUG"> <root level="error">
<!-- <appender-ref ref="FILE" /> --> <!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" /> <appender-ref ref="STDOUT" />
<!-- <appender-ref ref="ELK" />--> <!-- <appender-ref ref="ELK" />-->
......
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