Commit fb525736 by 朱继来

调整邮件发送

parent 3ea4aedd
......@@ -2,7 +2,6 @@ package sendEmail
import (
"encoding/json"
_ "fmt"
"github.com/ichunt2019/logger"
"go-queue-server/dal/order/OrderActionLog"
"go-queue-server/util"
......@@ -50,6 +49,11 @@ func SendPurchaseEmail(data string) (err error) {
var data_params *DataParams
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
operator_id := data_params.OperatorId
operator_event := data_params.OperatorEvent
......@@ -61,8 +65,6 @@ func SendPurchaseEmail(data string) (err error) {
return err
}
ding.Send(util.Configs.Ding_msg.Webhook, "监控告警", "订单ID:" + strconv.Itoa(order_id) + "," + operator_event, mobile, isAtAll)
// 推送ERP
api_url := util.Configs.Api_domain.ApiUrl + "order/sysiteminfo"
params := "order_id="+strconv.Itoa(order_id)
......@@ -78,6 +80,8 @@ func SendPurchaseEmail(data string) (err error) {
return err
}
ding.Send(util.Configs.Ding_msg.Webhook, "监控告警", "订单ID:" + strconv.Itoa(order_id) + "," + operator_event + ",字段同步ERP成功", mobile, isAtAll)
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