30 lines
843 B
Go
30 lines
843 B
Go
package model
|
|
|
|
func Order2Status(order *GoodsOrder) (retVal *OrderStatus) {
|
|
retVal = &OrderStatus{
|
|
VendorOrderID: order.VendorOrderID,
|
|
VendorID: order.VendorID,
|
|
OrderType: OrderTypeOrder,
|
|
RefVendorOrderID: order.VendorOrderID,
|
|
RefVendorID: order.VendorID,
|
|
Status: order.Status,
|
|
VendorStatus: order.VendorStatus,
|
|
StatusTime: order.StatusTime,
|
|
}
|
|
return retVal
|
|
}
|
|
|
|
func Waybill2Status(bill *Waybill) (retVal *OrderStatus) {
|
|
retVal = &OrderStatus{
|
|
VendorOrderID: bill.VendorWaybillID,
|
|
VendorID: bill.WaybillVendorID,
|
|
OrderType: OrderTypeWaybill,
|
|
RefVendorOrderID: bill.VendorOrderID,
|
|
RefVendorID: bill.OrderVendorID,
|
|
Status: bill.Status,
|
|
VendorStatus: bill.VendorStatus,
|
|
StatusTime: bill.WaybillCreatedAt,
|
|
}
|
|
return retVal
|
|
}
|