- waybillStatus.Status > model.WaybillStatusUnknown in OnWaybillStatusChanged and OnOrderStatusChanged.

This commit is contained in:
gazebo
2018-07-26 21:27:01 +08:00
parent d4ce33007b
commit 96912cdcb9
3 changed files with 3 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ func (c *WaybillController) onWaybillStatusMsg(msg *elmapi.CallbackWaybillStatus
msg.MsgType != elmapi.MsgTypeDeiverBySelf { msg.MsgType != elmapi.MsgTypeDeiverBySelf {
order.Status = model.WaybillStatusFailed order.Status = model.WaybillStatusFailed
} else { } else {
// MsgTypeWait4Courier // MsgTypeWaybillWait4DeliveryVendor
// MsgTypeDeiverBySelf // MsgTypeDeiverBySelf
order.Status = model.WaybillStatusUnknown order.Status = model.WaybillStatusUnknown
} }

View File

@@ -245,7 +245,7 @@ func (c *OrderController) addOrderStatus(orderStatus *model.OrderStatus, db orm.
db = orm.NewOrm() db = orm.NewOrm()
} }
isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db) isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db)
if err == nil && !isDuplicated && orderStatus.Status > model.OrderStatusNew { if err == nil && !isDuplicated && orderStatus.Status > model.OrderStatusUnknown {
params := orm.Params{ params := orm.Params{
"status": orderStatus.Status, "status": orderStatus.Status,
"vendor_status": orderStatus.VendorStatus, "vendor_status": orderStatus.VendorStatus,

View File

@@ -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) { func (w *WaybillController) addWaybillStatus(bill *model.Waybill, db orm.Ormer, addParams orm.Params) (isDuplicated bool, err error) {
waybillStatus := model.Waybill2Status(bill) waybillStatus := model.Waybill2Status(bill)
isDuplicated, err = addOrderOrWaybillStatus(waybillStatus, db) 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{ params := utils.MergeMaps(orm.Params{
"status": bill.Status, "status": bill.Status,
"vendor_status": bill.VendorStatus, "vendor_status": bill.VendorStatus,