- 将IsMobileFake用IsStringLikeMobile替换
- 添加HandleOrder4Consignee, GetRealMobile4Order和GetAuthType4Vendor - 添加GoodsOrder.VendorUserID
This commit is contained in:
@@ -171,6 +171,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
VendorStoreID: shopMap["baidu_shop_id"].(string),
|
||||
StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(shopMap["id"]), 0)),
|
||||
StoreName: shopMap["name"].(string),
|
||||
VendorUserID: utils.Interface2String(userMap["user_id"]),
|
||||
ConsigneeName: userMap["name"].(string),
|
||||
ConsigneeMobile: jxutils.FormalizeMobile(userMap["phone"].(string)),
|
||||
ConsigneeAddress: userMap["address"].(string),
|
||||
|
||||
@@ -138,18 +138,6 @@ func (c *PurchaseHandler) getOrder(orderID string) (order *model.GoodsOrder, ord
|
||||
if order != nil && orderSettlement != nil {
|
||||
updateOrderBySettleMent(order, orderSettlement)
|
||||
}
|
||||
// if orderMap, err = getAPI("").QuerySingleOrder(orderID); err == nil {
|
||||
// globals.SugarLogger.Debugf("jd getOrder2 orderID:%s", orderID)
|
||||
// order = c.Map2Order(orderMap)
|
||||
// if jxutils.IsMobileFake(order.ConsigneeMobile) {
|
||||
// if realMobile, err := getAPI("").GetRealMobile4Order(orderID, order.VendorStoreID); err == nil { // 故意强制忽略取不到真实手机号错误
|
||||
// globals.SugarLogger.Debugf("jd getOrder3 orderID:%s", orderID)
|
||||
// order.ConsigneeMobile2 = jxutils.FormalizeMobile(realMobile)
|
||||
// } else {
|
||||
// // globals.SugarLogger.Warnf("jd GetOrder orderID:%s, GetRealMobile4Order failed with error:%v", orderID, err2)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return order, orderMap, err
|
||||
}
|
||||
|
||||
@@ -174,6 +162,7 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
VendorStoreID: utils.Interface2String(result["produceStationNo"]),
|
||||
StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(result["produceStationNoIsv"]), 0)),
|
||||
StoreName: utils.Interface2String(result["produceStationName"]),
|
||||
VendorUserID: utils.Interface2String(result["buyerPin"]),
|
||||
ConsigneeName: utils.Interface2String(result["buyerFullName"]),
|
||||
ConsigneeMobile: jxutils.FormalizeMobile(utils.Interface2String(result["buyerMobile"])),
|
||||
ConsigneeAddress: utils.Interface2String(result["buyerFullAddress"]),
|
||||
|
||||
@@ -122,6 +122,10 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(result["total"])),
|
||||
}
|
||||
openUID := utils.Interface2Int64WithDefault(result["openUid"], 0)
|
||||
if openUID > 0 {
|
||||
order.VendorUserID = utils.Int64ToStr(openUID)
|
||||
}
|
||||
if utils.IsTimeZero(order.PickDeadline) && !utils.IsTimeZero(order.StatusTime) {
|
||||
order.PickDeadline = order.StatusTime.Add(pickupOrderDelay) // 美团外卖要求在5分钟内拣货,不然订单会被取消
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user