增加预警
This commit is contained in:
parent
dc0ab16dca
commit
3925ba5bb0
|
|
@ -223,14 +223,14 @@ func (v *Cmb) alarm(ctx context.Context, order *bo.OrderBo, errMsg string) error
|
|||
|
||||
func (v *Cmb) alarmText(_ context.Context, order *bo.OrderBo, errMsg string) string {
|
||||
|
||||
remarks := fmt.Sprintf("订单号:%s,商品编号:%s,错误原因:%s", order.OrderNo, order.ProductNo, errMsg)
|
||||
remarks := fmt.Sprintf("订单号:%s,商品编号:%s,原因:%s", order.OrderNo, order.ProductNo, errMsg)
|
||||
|
||||
msg := "# <font color='green'>" +
|
||||
"<h1>立减金发放平台报警通知</h1>" +
|
||||
"</font> \n" +
|
||||
"<font color='black'>" +
|
||||
"不好了,订单发放发生异常了,错误内容" +
|
||||
"[<font color='red'>%s</font>]@相关人员。" +
|
||||
"不好了,订单发放发生异常了" +
|
||||
"[<font color='red'>%s</font>]请尽快处理@相关人员。" +
|
||||
"</font>"
|
||||
|
||||
return fmt.Sprintf(msg, remarks)
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ func (c *TalkClient) SendLinkMessage(title, text, messageURL, picURL string, atM
|
|||
func (c *TalkClient) SendMarkdownMessage(title, text string, atMobiles []string, isAtAll bool) error {
|
||||
var atStr string
|
||||
for _, mobile := range atMobiles {
|
||||
atStr += fmt.Sprintf("<font color='#006400'>@%s</font>", mobile)
|
||||
atStr += fmt.Sprintf("<font color='#003BFF'>@%s</font>", mobile)
|
||||
}
|
||||
text += atStr
|
||||
|
||||
|
|
|
|||
|
|
@ -65,14 +65,14 @@ func TestSendMarkdownMessage(t *testing.T) {
|
|||
|
||||
func alarmText(errMsg string) string {
|
||||
|
||||
remarks := fmt.Sprintf("订单号:%s,商品编号:%s,错误原因:%s", "123456", "001", errMsg)
|
||||
remarks := fmt.Sprintf("订单号:%s,商品编号:%s,原因:%s", "123456", "001", errMsg)
|
||||
|
||||
msg := "# <font color='green'>" +
|
||||
"<h1>立减金发放平台报警通知</h1>" +
|
||||
"</font> \n" +
|
||||
"<font color='black'>" +
|
||||
"不好了,订单发放发生异常了,错误内容" +
|
||||
"[<font color='red'>%s</font>]@相关人员。" +
|
||||
"不好了,订单发放发生异常了" +
|
||||
"[<font color='red'>%s</font>]请尽快处理@相关人员。" +
|
||||
"</font>"
|
||||
|
||||
return fmt.Sprintf(msg, remarks)
|
||||
|
|
|
|||
Loading…
Reference in New Issue