京东售后单修改

This commit is contained in:
苏尹岚
2020-06-27 13:48:23 +08:00
parent 9b7c4c9a42
commit 6e07a0a637
4 changed files with 13 additions and 15 deletions

View File

@@ -127,8 +127,8 @@ func (c *PurchaseHandler) onOrderInfoChangeMsg(vendorOrgCode string, msg *jdapi.
order, _, err := c.getOrder(a, msg.BillID)
if err == nil {
globals.SugarLogger.Debugf("onOrderInfoChangeMsg orderID:%s", msg.BillID)
valid := orderInfoChangeSet(order, msg)
partner.CurOrderManager.ChangeOrderInfo(order, valid)
orderInfoChangeSet(order, msg)
partner.CurOrderManager.ChangeOrderInfo(order)
}
return retVal
}
@@ -574,25 +574,23 @@ func (c *PurchaseHandler) ConfirmSelfTake(ctx *jxcontext.Context, order *model.G
return err
}
func orderInfoChangeSet(order *model.GoodsOrder, msg *jdapi.CallbackOrderInfoChangeMsg) (valid map[string]interface{}) {
valid = make(map[string]interface{})
func orderInfoChangeSet(order *model.GoodsOrder, msg *jdapi.CallbackOrderInfoChangeMsg) {
if msg.BuyerFullAddress != "" {
valid["consigneeAddress"] = msg.BuyerFullAddress
order.ConsigneeAddress = msg.BuyerFullAddress
}
if msg.BuyerFullName != "" {
valid["consigneeName"] = msg.BuyerFullName
order.ConsigneeName = msg.BuyerFullName
}
if msg.BuyerMobile != "" {
valid["consigneeMobile"] = msg.BuyerMobile
order.ConsigneeMobile = msg.BuyerMobile
}
if msg.BuyerLat != 0 {
valid["consigneeLat"] = jxutils.StandardCoordinate2Int(msg.BuyerLat)
order.ConsigneeLat = jxutils.StandardCoordinate2Int(msg.BuyerLat)
}
if msg.BuyerLng != 0 {
valid["consigneeLng"] = jxutils.StandardCoordinate2Int(msg.BuyerLng)
order.ConsigneeLng = jxutils.StandardCoordinate2Int(msg.BuyerLng)
}
if msg.OrderBuyerRemark != "" {
valid["buyerComment"] = msg.OrderBuyerRemark
order.BuyerComment = msg.OrderBuyerRemark
}
return valid
}