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
a1cbca03
Commit
a1cbca03
authored
Aug 24, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
默认值添加
parent
4e249086
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
KafkaConsumerService.java
.../com/yeejoin/amos/message/kafka/KafkaConsumerService.java
+4
-3
No files found.
amos-boot-utils/amos-boot-utils-message/src/main/java/com/yeejoin/amos/message/kafka/KafkaConsumerService.java
View file @
a1cbca03
...
...
@@ -54,7 +54,7 @@ public class KafkaConsumerService implements ApplicationRunner {
* execl文件路径,读取excel
*/
// @Value("${filter.excel.path:F:\\filterExcel11.xlsx}")
@Value
(
"${filter.excel.path}"
)
@Value
(
"${filter.excel.path
:
}"
)
private
String
filePath
;
/**
...
...
@@ -136,6 +136,7 @@ public class KafkaConsumerService implements ApplicationRunner {
@Override
public
void
run
(
ApplicationArguments
args
)
{
codeListInfo
=
readExcelFile
(
filePath
);
log
.
info
(
"excel文件数据:{}"
,
JSON
.
toJSONString
(
codeListInfo
));
}
/**
...
...
@@ -144,9 +145,9 @@ public class KafkaConsumerService implements ApplicationRunner {
*/
private
Boolean
isSendEmq
(
com
.
alibaba
.
fastjson
.
JSONObject
res
)
{
String
key
=
""
;
if
(!
StringUtils
.
isEmpty
(
res
.
get
(
"
kafkaTopic"
))
&&
topic1
.
equals
(
res
.
get
(
"kafka
Topic"
).
toString
()))
{
if
(!
StringUtils
.
isEmpty
(
res
.
get
(
"
mqTopic"
))
&&
topic1
.
equals
(
res
.
get
(
"mq
Topic"
).
toString
()))
{
key
=
res
.
getJSONObject
(
"data"
).
get
(
"key"
).
toString
();
}
else
if
(!
StringUtils
.
isEmpty
(
res
.
get
(
"
kafkaTopic"
))
&&
topic2
.
equals
(
res
.
get
(
"kafka
Topic"
).
toString
()))
{
}
else
if
(!
StringUtils
.
isEmpty
(
res
.
get
(
"
mqTopic"
))
&&
topic2
.
equals
(
res
.
get
(
"mq
Topic"
).
toString
()))
{
key
=
res
.
getJSONObject
(
"data"
).
getJSONArray
(
"warns"
).
getJSONObject
(
0
).
get
(
"pointId"
).
toString
();
}
return
!
StringUtils
.
isEmpty
(
key
)
&&
codeListInfo
.
contains
(
key
);
...
...
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