Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
孙龙
/
golang-queue-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
fb525736
authored
Jun 11, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整邮件发送
parent
3ea4aedd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
order/sendPurchaseEmail/sendEmail/sendEmail.go
order/sendPurchaseEmail/sendEmail/sendEmail.go
View file @
fb525736
...
@@ -2,7 +2,6 @@ package sendEmail
...
@@ -2,7 +2,6 @@ package sendEmail
import
(
import
(
"encoding/json"
"encoding/json"
_
"fmt"
"github.com/ichunt2019/logger"
"github.com/ichunt2019/logger"
"go-queue-server/dal/order/OrderActionLog"
"go-queue-server/dal/order/OrderActionLog"
"go-queue-server/util"
"go-queue-server/util"
...
@@ -50,6 +49,11 @@ func SendPurchaseEmail(data string) (err error) {
...
@@ -50,6 +49,11 @@ func SendPurchaseEmail(data string) (err error) {
var
data_params
*
DataParams
var
data_params
*
DataParams
json
.
Unmarshal
([]
byte
(
data
),
&
data_params
)
json
.
Unmarshal
([]
byte
(
data
),
&
data_params
)
if
data_params
.
OrderId
==
0
{
ding
.
Send
(
util
.
Configs
.
Ding_msg
.
Webhook
,
"监控告警"
,
"推送采购员:"
+
data
,
mobile
,
isAtAll
)
return
}
order_id
:=
data_params
.
OrderId
order_id
:=
data_params
.
OrderId
operator_id
:=
data_params
.
OperatorId
operator_id
:=
data_params
.
OperatorId
operator_event
:=
data_params
.
OperatorEvent
operator_event
:=
data_params
.
OperatorEvent
...
@@ -61,8 +65,6 @@ func SendPurchaseEmail(data string) (err error) {
...
@@ -61,8 +65,6 @@ func SendPurchaseEmail(data string) (err error) {
return
err
return
err
}
}
ding
.
Send
(
util
.
Configs
.
Ding_msg
.
Webhook
,
"监控告警"
,
"订单ID:"
+
strconv
.
Itoa
(
order_id
)
+
","
+
operator_event
,
mobile
,
isAtAll
)
// 推送ERP
// 推送ERP
api_url
:=
util
.
Configs
.
Api_domain
.
ApiUrl
+
"order/sysiteminfo"
api_url
:=
util
.
Configs
.
Api_domain
.
ApiUrl
+
"order/sysiteminfo"
params
:=
"order_id="
+
strconv
.
Itoa
(
order_id
)
params
:=
"order_id="
+
strconv
.
Itoa
(
order_id
)
...
@@ -78,6 +80,8 @@ func SendPurchaseEmail(data string) (err error) {
...
@@ -78,6 +80,8 @@ func SendPurchaseEmail(data string) (err error) {
return
err
return
err
}
}
ding
.
Send
(
util
.
Configs
.
Ding_msg
.
Webhook
,
"监控告警"
,
"订单ID:"
+
strconv
.
Itoa
(
order_id
)
+
","
+
operator_event
+
",字段同步ERP成功"
,
mobile
,
isAtAll
)
return
return
}
}
...
...
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