订单状态修改
This commit is contained in:
@@ -1066,7 +1066,7 @@ func (c *OrderManager) AmendMissingOrders(ctx *jxcontext.Context, vendorIDs []in
|
||||
if err = err2; err == nil {
|
||||
if model.IsOrderFinalStatus(order.Status) {
|
||||
goodsOrder.Status = order.Status
|
||||
goodsOrder.OrderFinishedAt = order.OrderFinishedAt
|
||||
goodsOrder.OrderFinishedAt = order.StatusTime
|
||||
_, err = dao.UpdateEntity(db, goodsOrder, "Status", "OrderFinishedAt")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,12 +212,12 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
OrderSeq: int(utils.ForceInterface2Int64(orderMap["order_index"])),
|
||||
StatusTime: getTimeFromInterface(orderMap["create_time"]),
|
||||
OrderCreatedAt: getTimeFromInterface(orderMap["create_time"]),
|
||||
OrderFinishedAt: getTimeFromInterface(orderMap["finished_time"]),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: utils.ForceInterface2Int64(orderMap["user_fee"]),
|
||||
BaseFreightMoney: utils.ForceInterface2Int64(orderMap["send_fee"]),
|
||||
TotalShopMoney: utils.ForceInterface2Int64(orderMap["shop_fee"]),
|
||||
DeliveryType: mapDeliveryType(int(utils.ForceInterface2Int64(orderMap["delivery_party"]))),
|
||||
// OrderFinishedAt: getTimeFromInterface(orderMap["finished_time"]),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: utils.ForceInterface2Int64(orderMap["user_fee"]),
|
||||
BaseFreightMoney: utils.ForceInterface2Int64(orderMap["send_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"]),
|
||||
|
||||
@@ -184,13 +184,13 @@ func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
OrderSeq: int(utils.MustInterface2Int64(result["orderNum"])),
|
||||
StatusTime: utils.Str2Time(result[statusTimeField].(string)),
|
||||
OrderCreatedAt: utils.Str2Time(result[statusTimeField].(string)),
|
||||
OrderFinishedAt: utils.Str2Time(result["orderStatusTime"].(string)),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: utils.MustInterface2Int64(result["orderBuyerPayableMoney"]),
|
||||
BaseFreightMoney: utils.Interface2Int64WithDefault(result["orderBaseFreightMoney"], 0),
|
||||
DistanceFreightMoney: utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0),
|
||||
DeliveryType: deliveryTypeMap[int(utils.Str2Int64WithDefault(utils.Interface2String(result["deliveryCarrierNo"]), 0))],
|
||||
VendorOrgCode: utils.Interface2String(result["orgCode"]),
|
||||
// OrderFinishedAt: utils.Str2Time(result["orderStatusTime"].(string)),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: utils.MustInterface2Int64(result["orderBuyerPayableMoney"]),
|
||||
BaseFreightMoney: utils.Interface2Int64WithDefault(result["orderBaseFreightMoney"], 0),
|
||||
DistanceFreightMoney: utils.Interface2Int64WithDefault(result["merchantPaymentDistanceFreightMoney"], 0),
|
||||
DeliveryType: deliveryTypeMap[int(utils.Str2Int64WithDefault(utils.Interface2String(result["deliveryCarrierNo"]), 0))],
|
||||
VendorOrgCode: utils.Interface2String(result["orgCode"]),
|
||||
}
|
||||
if orderInvoice, ok := result["orderInvoice"].(map[string]interface{}); ok && orderInvoice != nil {
|
||||
order.InvoiceTitle = utils.Interface2String(orderInvoice["invoiceTitle"])
|
||||
|
||||
@@ -133,10 +133,10 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
OrderSeq: int(utils.MustInterface2Int64(result["day_seq"])),
|
||||
StatusTime: getTimeFromTimestamp(utils.MustInterface2Int64(result["ctime"])),
|
||||
OrderCreatedAt: getTimeFromTimestamp(utils.MustInterface2Int64(result["ctime"])),
|
||||
OrderFinishedAt: getTimeFromTimestamp(utils.MustInterface2Int64(result["order_completed_time"])),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(result["total"])),
|
||||
BaseFreightMoney: jxutils.StandardPrice2Int(utils.Interface2Float64WithDefault(result["shipping_fee"], 0)),
|
||||
// OrderFinishedAt: getTimeFromTimestamp(utils.MustInterface2Int64(result["order_completed_time"])),
|
||||
OriginalData: string(utils.MustMarshal(result)),
|
||||
ActualPayPrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(result["total"])),
|
||||
BaseFreightMoney: jxutils.StandardPrice2Int(utils.Interface2Float64WithDefault(result["shipping_fee"], 0)),
|
||||
|
||||
InvoiceTitle: utils.Interface2String(result["invoice_title"]),
|
||||
InvoiceTaxerID: utils.Interface2String(result["taxpayer_id"]),
|
||||
|
||||
Reference in New Issue
Block a user