This commit is contained in:
邹宗楠
2025-05-23 13:38:57 +08:00
parent 3909dbc5f5
commit 90ba173b80
3 changed files with 16 additions and 0 deletions

View File

@@ -267,6 +267,10 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
default: // 不需要或者错误
}
if utils.Interface2String(userMap["backupPhone"]) != "" {
order.ConsigneeMobile2 = jxutils.FormalizeMobile(utils.Interface2String(userMap["backupPhone"]))
}
finishTime := getTimeFromInterface(orderMap["finished_time"])
if finishTime == utils.ZeroTimeValue {
order.OrderFinishedAt = utils.DefaultTimeValue

View File

@@ -1,6 +1,7 @@
package mtwm
import (
"encoding/json"
"errors"
"fmt"
push "git.rosy.net.cn/jx-callback/business/jxutils/unipush"
@@ -164,6 +165,14 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
} else {
order.OrderFinishedAt = utils.DefaultTimeValue
}
if result["backup_recipient_phone"] != nil {
backupRecipientPhone := result["backup_recipient_phone"].(string)
phones := make([]string, 0, 0)
json.Unmarshal([]byte(backupRecipientPhone), &phones)
if len(phones) > model.NO {
order.ConsigneeMobile2 = jxutils.FormalizeMobile(phones[0])
}
}
pickType := int(utils.Interface2Int64WithDefault(result["pick_type"], 0))
if pickType == mtwmapi.OrderPickTypeSelf {
order.DeliveryType = model.OrderDeliveryTypeSelfTake