- waybillStatus.Status > model.WaybillStatusUnknown in OnWaybillStatusChanged and OnOrderStatusChanged.
This commit is contained in:
@@ -44,7 +44,7 @@ func (c *WaybillController) onWaybillStatusMsg(msg *elmapi.CallbackWaybillStatus
|
||||
msg.MsgType != elmapi.MsgTypeDeiverBySelf {
|
||||
order.Status = model.WaybillStatusFailed
|
||||
} else {
|
||||
// MsgTypeWait4Courier
|
||||
// MsgTypeWaybillWait4DeliveryVendor
|
||||
// MsgTypeDeiverBySelf
|
||||
order.Status = model.WaybillStatusUnknown
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ func (c *OrderController) addOrderStatus(orderStatus *model.OrderStatus, db orm.
|
||||
db = orm.NewOrm()
|
||||
}
|
||||
isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db)
|
||||
if err == nil && !isDuplicated && orderStatus.Status > model.OrderStatusNew {
|
||||
if err == nil && !isDuplicated && orderStatus.Status > model.OrderStatusUnknown {
|
||||
params := orm.Params{
|
||||
"status": orderStatus.Status,
|
||||
"vendor_status": orderStatus.VendorStatus,
|
||||
|
||||
@@ -94,7 +94,7 @@ func (w *WaybillController) OnWaybillStatusChanged(bill *model.Waybill) (err err
|
||||
func (w *WaybillController) addWaybillStatus(bill *model.Waybill, db orm.Ormer, addParams orm.Params) (isDuplicated bool, err error) {
|
||||
waybillStatus := model.Waybill2Status(bill)
|
||||
isDuplicated, err = addOrderOrWaybillStatus(waybillStatus, db)
|
||||
if err == nil && !isDuplicated && waybillStatus.Status > model.WaybillStatusNew {
|
||||
if err == nil && !isDuplicated && waybillStatus.Status > model.WaybillStatusUnknown {
|
||||
params := utils.MergeMaps(orm.Params{
|
||||
"status": bill.Status,
|
||||
"vendor_status": bill.VendorStatus,
|
||||
|
||||
Reference in New Issue
Block a user