- 防止重复发送订单取消通知消息

This commit is contained in:
gazebo
2019-09-21 17:01:41 +08:00
parent 190793d6ec
commit 3f459a5e10
4 changed files with 13 additions and 9 deletions

View File

@@ -330,7 +330,7 @@ func NotifyUserApplyCancel(order *model.GoodsOrder, cancelReason string) (err er
},
"keyword1": map[string]interface{}{ // 订单编号
"value": fmt.Sprintf("%s第%d号订单, %s", model.VendorChineseNames[order.VendorID], order.OrderSeq, order.VendorOrderID),
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
"color": venderColors[order.VendorID],
},
"keyword2": map[string]interface{}{ // 订单日期
"value": utils.Time2Str(order.OrderCreatedAt),
@@ -338,7 +338,7 @@ func NotifyUserApplyCancel(order *model.GoodsOrder, cancelReason string) (err er
},
"keyword3": map[string]interface{}{ // 订单内容
"value": cancelReason,
"color": venderColors[order.VendorID],
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
},
"remark": map[string]interface{}{
"value": order.ConsigneeMobile,
@@ -377,6 +377,10 @@ func NotifyOrderCanceled(order *model.GoodsOrder) (err error) {
},
"orderAddress": map[string]interface{}{
"value": order.ConsigneeAddress,
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
},
"orderName": map[string]interface{}{
"value": fmt.Sprintf("%s第%d号订单, %s", model.VendorChineseNames[order.VendorID], order.OrderSeq, order.VendorOrderID),
"color": venderColors[order.VendorID],
},
"remark": map[string]interface{}{