Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
logtransfer
Project
Project
Details
Activity
Releases
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
谢宇轩
logtransfer
Commits
09f7c237
Commit
09f7c237
authored
Jan 30, 2023
by
李世星
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(修改模板): 202301301651
parent
0db01695
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
message.go
ding/message.go
+2
-2
customer.go
source/customer.go
+1
-0
No files found.
ding/message.go
View file @
09f7c237
...
...
@@ -73,9 +73,9 @@ func CreateDingMessage(messageType string, msg interface{}, mobiles []string) DD
func
pluginNotice
(
msg
interface
{})
string
{
mateData
:=
msg
.
(
*
entity
.
Matedata
)
templateBuff
:=
bytes
.
NewBuffer
([]
byte
{})
templateBuff
.
WriteString
(
fmt
.
Sprintf
(
"# 服务通知
\r\n
>
(节点)
:%s"
,
mateData
.
SourceAgent
))
templateBuff
.
WriteString
(
fmt
.
Sprintf
(
"# 服务通知
\r\n
>
【节点】
:%s"
,
mateData
.
SourceAgent
))
for
key
,
value
:=
range
mateData
.
Data
{
templateBuff
.
WriteString
(
fmt
.
Sprintf
(
"
\r\n
>
(%s)
:%s"
,
key
,
value
))
templateBuff
.
WriteString
(
fmt
.
Sprintf
(
"
\r\n
>
【%s】
:%s"
,
key
,
value
))
}
templateBuff
.
WriteString
(
fmt
.
Sprintf
(
"
\r\n
###### %s"
,
time
.
Now
()
.
Format
(
"2006/01/02 15:04:05"
)))
...
...
source/customer.go
View file @
09f7c237
...
...
@@ -121,6 +121,7 @@ func ReadingMessage(ctx context.Context, c *Customer) {
}
matedata
,
err
=
c
.
Format
(
string
(
reader
.
Config
()
.
Topic
),
string
(
m
.
Value
))
matedata
.
SourceAgent
=
"默认节点"
for
_
,
header
:=
range
m
.
Headers
{
if
header
.
Key
==
"source_agent"
{
matedata
.
SourceAgent
=
string
(
header
.
Value
)
...
...
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