京东用户修改订单信息

This commit is contained in:
苏尹岚
2020-07-01 08:50:36 +08:00
parent 7b81213216
commit e3b33f0c3d
2 changed files with 21 additions and 24 deletions

View File

@@ -6,6 +6,8 @@ import (
"strings"
"time"
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
@@ -129,9 +131,9 @@ func (c *PurchaseHandler) onOrderInfoChangeMsg(vendorOrgCode string, msg *jdapi.
globals.SugarLogger.Debugf("onOrderInfoChangeMsg orderID:%s", msg.BillID)
orderInfoChangeSet(order, msg)
globals.SugarLogger.Debugf("onOrderInfoChangeMsg2: %v", order)
// db := dao.GetDB()
// _, err = dao.UpdateEntity(db, order, "ConsigneeAddress", "ConsigneeName", "ConsigneeMobile", "ConsigneeLat", "ConsigneeLng", "BuyerComment")
// weixinmsg.NotifyOrderChanged(order)
db := dao.GetDB()
_, err = dao.UpdateEntity(db, order, "ConsigneeAddress", "ConsigneeName", "ConsigneeMobile", "ConsigneeLat", "ConsigneeLng", "BuyerComment")
weixinmsg.NotifyOrderChanged(order)
// partner.CurOrderManager.ChangeOrderInfo(order)
}
return retVal
@@ -588,11 +590,11 @@ func orderInfoChangeSet(order *model.GoodsOrder, msg *jdapi.CallbackOrderInfoCha
if msg.BuyerMobile != "" {
order.ConsigneeMobile = msg.BuyerMobile
}
if msg.BuyerLat != 0 {
order.ConsigneeLat = jxutils.StandardCoordinate2Int(msg.BuyerLat)
if msg.BuyerLat != "" {
order.ConsigneeLat = jxutils.StandardCoordinate2Int(utils.Str2Float64(msg.BuyerLat))
}
if msg.BuyerLng != 0 {
order.ConsigneeLng = jxutils.StandardCoordinate2Int(msg.BuyerLng)
if msg.BuyerLng != "" {
order.ConsigneeLng = jxutils.StandardCoordinate2Int(utils.Str2Float64(msg.BuyerLng))
}
if msg.OrderBuyerRemark != "" {
order.BuyerComment = msg.OrderBuyerRemark