Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
2496208d
Commit
2496208d
authored
Dec 27, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into feature-daiban-12-14
parents
9b04e32a
73ce6248
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
NoticeMessageApiServiceImpl.java
...rvice/service/notify/out/NoticeMessageApiServiceImpl.java
+8
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/NoticeMessageApiServiceImpl.java
View file @
2496208d
...
@@ -27,6 +27,7 @@ import com.gic.wechat.api.dto.qywx.ItemDTO;
...
@@ -27,6 +27,7 @@ import com.gic.wechat.api.dto.qywx.ItemDTO;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -189,10 +190,17 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -189,10 +190,17 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
logger
.
info
(
"不存在模板"
);
logger
.
info
(
"不存在模板"
);
return
null
;
return
null
;
}
}
//需要替换的数据
//需要替换的数据
Map
<
String
,
String
>
contentMap
=
messageQDTO
.
getContentMap
();
Map
<
String
,
String
>
contentMap
=
messageQDTO
.
getContentMap
();
if
(
MapUtils
.
isEmpty
(
contentMap
))
{
return
templateMessage
;
}
//替换的内容
//替换的内容
for
(
TemplateContentBO
templateContentBO
:
templateMessage
)
{
for
(
TemplateContentBO
templateContentBO
:
templateMessage
)
{
contentMap
.
forEach
((
k
,
v
)
->
{
contentMap
.
forEach
((
k
,
v
)
->
{
templateContentBO
.
setVal
(
templateContentBO
.
getVal
().
replaceAll
(
"\\#\\{"
+
k
+
"\\}"
,
v
));
templateContentBO
.
setVal
(
templateContentBO
.
getVal
().
replaceAll
(
"\\#\\{"
+
k
+
"\\}"
,
v
));
});
});
...
...
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