Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
9cd379a1
Commit
9cd379a1
authored
May 29, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加es配置及修改气瓶查询es相关连接
parent
9d49011c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
CylinderFillingRecordServiceImpl.java
...lc/biz/service/impl/CylinderFillingRecordServiceImpl.java
+8
-1
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+7
-1
application-dev3.properties
...le-tzs-biz/src/main/resources/application-dev3.properties
+1
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderFillingRecordServiceImpl.java
View file @
9cd379a1
...
@@ -21,6 +21,7 @@ import org.elasticsearch.index.query.QueryBuilders;
...
@@ -21,6 +21,7 @@ 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
;
...
@@ -47,6 +48,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
...
@@ -47,6 +48,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
@Autowired
@Autowired
CylinderFillingRecordMapper
cylinderFillingRecordMapper
;
CylinderFillingRecordMapper
cylinderFillingRecordMapper
;
@Value
(
"${biz.elasticsearch.address}"
)
private
String
esAddress
;
@Value
(
"${biz.elasticsearch.port}"
)
private
Integer
esPort
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -178,7 +185,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
...
@@ -178,7 +185,7 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
Page
<
ESCylinderFillingRecordDto
>
result
=
new
Page
<
ESCylinderFillingRecordDto
>(
pageNum
,
pageSize
);
Page
<
ESCylinderFillingRecordDto
>
result
=
new
Page
<
ESCylinderFillingRecordDto
>(
pageNum
,
pageSize
);
RestHighLevelClient
esClient
=
new
RestHighLevelClient
(
RestHighLevelClient
esClient
=
new
RestHighLevelClient
(
RestClient
.
builder
(
new
HttpHost
(
"36.46.151.113"
,
9200
,
"http"
))
RestClient
.
builder
(
new
HttpHost
(
esAddress
,
esPort
,
"http"
))
);
);
SearchRequest
request
=
new
SearchRequest
();
SearchRequest
request
=
new
SearchRequest
();
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
9cd379a1
...
@@ -129,6 +129,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
...
@@ -129,6 +129,12 @@ 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}"
)
private
String
esAddress
;
@Value
(
"${biz.elasticsearch.port}"
)
private
Integer
esPort
;
@Autowired
@Autowired
StartPlatformTokenService
startPlatformTokenService
;
StartPlatformTokenService
startPlatformTokenService
;
...
@@ -711,7 +717,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
...
@@ -711,7 +717,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
Page
<
ESCylinderInfoDto
>
result
=
new
Page
<
ESCylinderInfoDto
>(
pageNum
,
pageSize
);
Page
<
ESCylinderInfoDto
>
result
=
new
Page
<
ESCylinderInfoDto
>(
pageNum
,
pageSize
);
RestHighLevelClient
esClient
=
new
RestHighLevelClient
(
RestHighLevelClient
esClient
=
new
RestHighLevelClient
(
RestClient
.
builder
(
new
HttpHost
(
"36.46.151.113"
,
9200
,
"http"
))
RestClient
.
builder
(
new
HttpHost
(
esAddress
,
esPort
,
"http"
))
);
);
SearchRequest
request
=
new
SearchRequest
();
SearchRequest
request
=
new
SearchRequest
();
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/resources/application-dev3.properties
View file @
9cd379a1
...
@@ -39,6 +39,7 @@ eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.por
...
@@ -39,6 +39,7 @@ eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.por
eureka.instance.ip-address
=
172.16.3.34
eureka.instance.ip-address
=
172.16.3.34
## ES properties:
## ES properties:
biz.elasticsearch.port
=
9200
biz.elasticsearch.address
=
36.46.151.113
biz.elasticsearch.address
=
36.46.151.113
spring.data.elasticsearch.cluster-name
=
docker-cluster
spring.data.elasticsearch.cluster-name
=
docker-cluster
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
spring.data.elasticsearch.cluster-nodes
=
${biz.elasticsearch.address}:9300
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment