This commit is contained in:
suyl
2021-06-09 11:32:39 +08:00
parent 2cefd8e2cd
commit ba9db17339

View File

@@ -162,8 +162,16 @@ func (c *PurchaseHandler) onOrderInfoChangeMsg(vendorOrgCode string, msg *jdapi.
order.BuyerComment = msg.OrderBuyerRemark
}
_, err = dao.UpdateEntity(db, order, "ConsigneeAddress", "ConsigneeName", "ConsigneeMobile", "ConsigneeLat", "ConsigneeLng", "BuyerComment")
if !(order.Status >= model.OrderStatusEndBegin && order.Status <= model.OrderStatusEndEnd) {
weixinmsg.NotifyOrderChanged(order)
if order.Status <= model.OrderStatusEndBegin {
if order.BusinessType == model.BusinessTypeImmediate {
if time.Now().Sub(order.OrderCreatedAt).Hours() <= 1 {
weixinmsg.NotifyOrderChanged(order)
}
} else {
if order.ExpectedDeliveredTime.Sub(time.Now()).Hours() >= 1 {
weixinmsg.NotifyOrderChanged(order)
}
}
}
}
return jdapi.SuccessResponse