- 梳理真实手机号相关的流程,ConsigneeMobile为真实手机号时ConsigneeMobile2也有值(之前不是这样的)

This commit is contained in:
gazebo
2019-03-28 15:54:21 +08:00
parent 24af4bc330
commit 4897c87bc1
7 changed files with 27 additions and 35 deletions

View File

@@ -78,7 +78,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
StoreID: int(utils.Str2Int64WithDefault(utils.Interface2String(shopMap["id"]), 0)),
StoreName: shopMap["name"].(string),
ConsigneeName: userMap["name"].(string),
ConsigneeMobile: userMap["phone"].(string),
ConsigneeMobile: jxutils.FormalizeMobile(userMap["phone"].(string)),
ConsigneeAddress: userMap["address"].(string),
CoordinateType: model.CoordinateTypeBaiDu,
BuyerComment: utils.TrimBlankChar(utils.Interface2String(orderMap["remark"])),
@@ -94,9 +94,9 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
if jxutils.IsTimeEmpty(order.PickDeadline) && !jxutils.IsTimeEmpty(order.StatusTime) {
order.PickDeadline = order.StatusTime.Add(pickupOrderDelay /* + time.Duration(rand.Intn(pickupOrderGap))*time.Second*/)
}
if jxutils.IsMobileFake(order.ConsigneeMobile) {
if order.ConsigneeMobile == "" {
if mobileInfo, err := api.EbaiAPI.OrderPrivateInfo(vendorOrderID); err == nil {
order.ConsigneeMobile = mobileInfo.ShortNumber
order.ConsigneeMobile = jxutils.FormalizeMobile(mobileInfo.ShortNumber)
}
}
if order.StoreID > math.MaxInt32 {