Commit 3470068c by 孙龙
parents d8f9228d a67e1521
...@@ -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
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment