京东用户修改订单信息
This commit is contained in:
@@ -332,44 +332,39 @@ func NotifyUserApplyCancel(order *model.GoodsOrder, cancelReason string) (err er
|
||||
}
|
||||
|
||||
func NotifyOrderChanged(order *model.GoodsOrder) (err error) {
|
||||
globals.SugarLogger.Debugf("NotifyOrderCanceled orderID:%s", order.VendorOrderID)
|
||||
globals.SugarLogger.Debugf("NotifyOrderChanged orderID:%s", order.VendorOrderID)
|
||||
if order.VendorID == model.VendorIDELM {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !model.IsOrderSolid(order) {
|
||||
globals.SugarLogger.Infof("NotifyOrderCanceled orderID:%s is not solid", order.VendorOrderID)
|
||||
return nil
|
||||
}
|
||||
title := fmt.Sprintf("老板,您的订单%s第%d号订单, %s被取消了!", model.VendorChineseNames[order.VendorID], order.OrderSeq, order.VendorOrderID)
|
||||
title := fmt.Sprintf("您有订单的信息已被修改")
|
||||
data := map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
"value": title,
|
||||
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
|
||||
},
|
||||
"orderProductPrice": map[string]interface{}{
|
||||
"value": jxutils.IntPrice2StandardCurrencyString(order.ActualPayPrice),
|
||||
"keyword1": map[string]interface{}{
|
||||
"value": order.VendorOrderID,
|
||||
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
|
||||
},
|
||||
"orderProductName": map[string]interface{}{
|
||||
"value": getOrderDetailBrief(order),
|
||||
"keyword2": map[string]interface{}{
|
||||
"value": "用户修改订单",
|
||||
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
|
||||
},
|
||||
"orderAddress": map[string]interface{}{
|
||||
"value": order.ConsigneeAddress,
|
||||
"keyword3": map[string]interface{}{
|
||||
"value": order.ConsigneeAddress + "," + order.ConsigneeName + "," + order.ConsigneeMobile,
|
||||
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
|
||||
},
|
||||
"orderName": map[string]interface{}{
|
||||
"value": fmt.Sprintf("%s第%d号订单, %s", model.VendorChineseNames[order.VendorID], order.OrderSeq, order.VendorOrderID),
|
||||
"keyword4": map[string]interface{}{
|
||||
"value": utils.Time2Str(order.OrderCreatedAt),
|
||||
"color": VendorColors[order.VendorID],
|
||||
},
|
||||
"remark": map[string]interface{}{
|
||||
"value": order.ConsigneeMobile,
|
||||
"value": "请及时处理",
|
||||
"color": WX_NEW_ORDER_TEMPLATE_COLOR,
|
||||
},
|
||||
}
|
||||
storeID := jxutils.GetSaleStoreIDFromOrder(order)
|
||||
err = SendMsgToStore(storeID, WX_ORDER_ORDER_CANCELED_TEMPLATE_ID, "", "", data)
|
||||
err = SendMsgToStore(storeID, WX_ORDER_CHANGE_INFO_TEMPLATE_ID, "", "", data)
|
||||
netprinter.NofityOrderMsg(jxcontext.AdminCtx, jxutils.GetSaleStoreIDFromOrder(order), order.VendorOrderID, title)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user