Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
98fe34dd
authored
Jan 30, 2024
by
汪志阳
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:推送微信公众号
parent
107d10ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
server-service/src/main/java/com/makeit/entity/saas/PlatTenant.java
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
server-service/src/main/java/com/makeit/entity/saas/PlatTenant.java
View file @
98fe34dd
...
...
@@ -45,7 +45,7 @@ public class PlatTenant extends BaseEntity {
private
String
menuList
;
/**
* 告警渠道 1-短信 2-邮件 3-语音短信 4-云龄工单 5-晶奇工单
* 告警渠道 1-短信 2-邮件 3-语音短信 4-云龄工单 5-晶奇工单
6-微信公众号
*/
private
String
alertChannel
;
...
...
server-service/src/main/java/com/makeit/service/platform/alarm/impl/PlatAlarmRecordServiceImpl.java
View file @
98fe34dd
...
...
@@ -420,8 +420,9 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
List
<
SendTypeEnum
>
notifyChannelList
,
List
<
MsgSendDTO
.
ReceiverInfo
>
receiverInfos
)
{
log
.
info
(
"开始短信通知:{}"
,
JSON
.
toJSONString
(
alarmConfig
));
String
notifyChannel
=
alarmConfig
.
getNotifyChannel
();
if
(
StringUtils
.
isEmpty
(
notifyChannel
)){
return
;
if
(
StringUtils
.
isEmpty
(
notifyChannel
))
{
// 微信公众号
notifyChannel
=
"6"
;
}
PlatTenant
platTenant
=
platTenantService
.
getById
(
alarmConfig
.
getTenantId
());
if
(
platTenant
==
null
){
...
...
@@ -432,7 +433,9 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
return
;
}
String
[]
tenantChannels
=
alertChannel
.
split
(
","
);
List
<
String
>
tenantChannelList
=
Arrays
.
asList
(
tenantChannels
);
List
<
String
>
tenantChannelList
=
Lists
.
newArrayList
(
Arrays
.
asList
(
tenantChannels
));
// 微信公众号
tenantChannelList
.
add
(
"6"
);
String
[]
split
=
notifyChannel
.
split
(
","
);
for
(
String
sendType
:
split
)
{
//租户告警渠道 没配置的 就不发送
...
...
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