订单GoodsOrder添加字段InvoiceTitle,InvoiceTaxerID和InvoiceEmail表示开发票信息
GetOrders添加可选参数mustInvoice表示只查询要求开发票的订单
This commit is contained in:
@@ -202,6 +202,10 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
ActualPayPrice: utils.ForceInterface2Int64(orderMap["user_fee"]),
|
||||
TotalShopMoney: utils.ForceInterface2Int64(orderMap["shop_fee"]),
|
||||
DeliveryType: mapDeliveryType(int(utils.ForceInterface2Int64(orderMap["delivery_party"]))),
|
||||
|
||||
InvoiceTitle: utils.Interface2String(orderMap["invoice_title"]),
|
||||
InvoiceTaxerID: utils.Interface2String(orderMap["taxer_id"]),
|
||||
InvoiceEmail: jxutils.GetOneEmailFromStr(utils.Interface2String(orderMap["remark"])),
|
||||
}
|
||||
if utils.IsTimeZero(order.PickDeadline) && !utils.IsTimeZero(order.StatusTime) {
|
||||
order.PickDeadline = order.StatusTime.Add(pickupOrderDelay) // 饿百要求在5分钟内拣货,不然订单会被取消
|
||||
|
||||
@@ -179,6 +179,11 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
DistanceFreightMoney: utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0),
|
||||
DeliveryType: deliveryTypeMap[int(utils.Str2Int64WithDefault(utils.Interface2String(result["deliveryCarrierNo"]), 0))],
|
||||
}
|
||||
if orderInvoice, ok := result["orderInvoice"].(map[string]interface{}); ok && orderInvoice != nil {
|
||||
order.InvoiceTitle = utils.Interface2String(orderInvoice["invoiceTitle"])
|
||||
order.InvoiceTaxerID = utils.Interface2String(orderInvoice["invoiceDutyNo"])
|
||||
order.InvoiceEmail = utils.Interface2String(orderInvoice["invoiceMail"])
|
||||
}
|
||||
order.Status = c.getStatusFromVendorStatus(order.VendorStatus)
|
||||
businessTage := utils.Interface2String(result["businessTag"])
|
||||
if strings.Index(businessTage, "dj_aging_immediately") >= 0 {
|
||||
|
||||
@@ -121,6 +121,10 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
OrderCreatedAt: getTimeFromTimestamp(utils.MustInterface2Int64(result["ctime"])),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(result["total"])),
|
||||
|
||||
InvoiceTitle: utils.Interface2String(result["invoice_title"]),
|
||||
InvoiceTaxerID: utils.Interface2String(result["taxpayer_id"]),
|
||||
InvoiceEmail: jxutils.GetOneEmailFromStr(utils.Interface2String(result["caution"])),
|
||||
}
|
||||
pickType := int(utils.Interface2Int64WithDefault(result["pick_type"], 0))
|
||||
if pickType == mtwmapi.OrderPickTypeSelf {
|
||||
|
||||
Reference in New Issue
Block a user