+ AcceptOrRefuseFailedGetOrder
+ CallPMCourier + ConfirmReceiveGoods
This commit is contained in:
@@ -11,6 +11,15 @@ import (
|
||||
"github.com/astaxie/beego/orm"
|
||||
)
|
||||
|
||||
var (
|
||||
waybillOrderStatusMap = map[int]int{
|
||||
model.WaybillStatusApplyFailedGetGoods: model.WaybillStatusApplyFailedGetGoods,
|
||||
model.WaybillStatusAgreeFailedGetGoods: model.WaybillStatusAgreeFailedGetGoods,
|
||||
model.WaybillStatusRefuseFailedGetGoods: model.WaybillStatusRefuseFailedGetGoods,
|
||||
model.WaybillStatusDeliverFailed: model.WaybillStatusDeliverFailed,
|
||||
}
|
||||
)
|
||||
|
||||
func (w *OrderManager) LoadPendingWaybills() []*model.Waybill {
|
||||
db := orm.NewOrm()
|
||||
var bills []*model.Waybill
|
||||
@@ -108,6 +117,22 @@ func (w *OrderManager) OnWaybillStatusChanged(bill *model.Waybill) (err error) {
|
||||
} else {
|
||||
dao.Rollback(db)
|
||||
}
|
||||
if bill.VendorOrderID == bill.VendorWaybillID {
|
||||
if status, ok := waybillOrderStatusMap[bill.Status]; ok {
|
||||
fakeOrderStatus := &model.OrderStatus{
|
||||
VendorOrderID: bill.VendorOrderID,
|
||||
VendorID: bill.OrderVendorID,
|
||||
OrderType: model.OrderTypeOrder,
|
||||
RefVendorOrderID: bill.VendorOrderID,
|
||||
RefVendorID: bill.OrderVendorID,
|
||||
Status: status,
|
||||
VendorStatus: bill.VendorStatus,
|
||||
StatusTime: bill.StatusTime,
|
||||
Remark: bill.Remark,
|
||||
}
|
||||
w.OnOrderStatusChanged(fakeOrderStatus)
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -128,3 +128,24 @@ func (c *BaseScheduler) CancelOrder(ctx *jxcontext.Context, order *model.GoodsOr
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *BaseScheduler) AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool, reason string) (err error) {
|
||||
if c.IsReallyCallPlatformAPI {
|
||||
err = partner.GetPurchasePlatformFromVendorID(order.VendorID).AcceptOrRefuseFailedGetOrder(ctx, order, isAcceptIt)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *BaseScheduler) CallPMCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) {
|
||||
if c.IsReallyCallPlatformAPI {
|
||||
err = partner.GetPurchasePlatformFromVendorID(order.VendorID).CallCourier(ctx, order)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *BaseScheduler) ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) {
|
||||
if c.IsReallyCallPlatformAPI {
|
||||
err = partner.GetPurchasePlatformFromVendorID(order.VendorID).ConfirmReceiveGoods(ctx, order)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ func (s *DefScheduler) OnOrderNew(order *model.GoodsOrder, isPending bool) (err
|
||||
|
||||
// todo 这个接口应该可以直接传order的,因为在OrderManager中每次都生成了
|
||||
func (s *DefScheduler) OnOrderStatusChanged(status *model.OrderStatus, isPending bool) (err error) {
|
||||
if status.LockStatus != model.OrderStatusUnknown || status.Status > model.OrderStatusUnknown {
|
||||
if status.LockStatus != model.OrderStatusUnknown || (status.Status > model.OrderStatusMsg && status.Status != model.OrderStatusUnknown) {
|
||||
globals.SugarLogger.Debugf("OnOrderStatusChanged orderID:%s %s, status:%v", status.VendorOrderID, model.OrderStatusName[status.Status], status)
|
||||
savedOrderInfo := s.loadSavedOrderFromMap(status, true)
|
||||
s.updateOrderByStatus(savedOrderInfo.order, status)
|
||||
@@ -273,18 +273,26 @@ func (s *DefScheduler) OnOrderStatusChanged(status *model.OrderStatus, isPending
|
||||
if status.Status >= model.OrderStatusEndBegin {
|
||||
s.orderMap.Delete(jxutils.GetUniversalOrderIDFromOrderStatus(status))
|
||||
}
|
||||
} else if status.Status == model.OrderStatusRefuseFailedGetGoods {
|
||||
// 将order状态设置为OrderStatusFinishedPickup
|
||||
}
|
||||
} else if status.LockStatus != model.OrderStatusUnknown {
|
||||
}
|
||||
if status.LockStatus != model.OrderStatusUnknown {
|
||||
s.stopTimer(savedOrderInfo)
|
||||
}
|
||||
} else if status.Status == model.OrderStatusApplyCancel {
|
||||
globals.SugarLogger.Debugf("OnOrderStatusChanged orderID:%s %s, status:%v", status.VendorOrderID, model.OrderStatusName[status.Status], status)
|
||||
savedOrderInfo := s.loadSavedOrderFromMap(status, true)
|
||||
s.updateOrderByStatus(savedOrderInfo.order, status)
|
||||
utils.CallFuncAsync(func() {
|
||||
weixinmsg.NotifyUserApplyCancel(savedOrderInfo.order, status.Remark)
|
||||
})
|
||||
msghub.OnUserApplyCancel(savedOrderInfo.order)
|
||||
if model.IsOrderLockStatus(status.Status) ||
|
||||
model.IsOrderUnlockStatus(status.Status) ||
|
||||
status.Status == model.OrderStatusApplyFailedGetGoods ||
|
||||
status.Status == model.OrderStatusAgreeFailedGetGoods {
|
||||
if isPending {
|
||||
if status.Status == model.OrderStatusApplyCancel {
|
||||
utils.CallFuncAsync(func() {
|
||||
weixinmsg.NotifyUserApplyCancel(savedOrderInfo.order, status.Remark)
|
||||
})
|
||||
}
|
||||
msghub.OnKeyOrderStatusChanged(savedOrderInfo.order)
|
||||
}
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -67,24 +67,29 @@ var (
|
||||
}
|
||||
|
||||
OrderStatusName = map[int]string{
|
||||
OrderStatusMsg: "通知消息",
|
||||
OrderStatusMsg: "通知消息",
|
||||
OrderStatusRefuseFailedGetGoods: "取货失败审核驳回",
|
||||
OrderStatusAdjust: "订单调整完成",
|
||||
OrderStatusWait4Pay: "待付款",
|
||||
OrderStatusApplyUrgeOrder: "催单",
|
||||
|
||||
OrderStatusWait4Pay: "待付款",
|
||||
OrderStatusUnlocked: "解锁",
|
||||
OrderStatusLocked: "锁定",
|
||||
OrderStatusApplyUrgeOrder: "催单",
|
||||
OrderStatusUnlocked: "解锁",
|
||||
OrderStatusLocked: "锁定",
|
||||
// OrderStatusApplyRefund: "申请退款",
|
||||
OrderStatusApplyCancel: "申请取消",
|
||||
OrderStatusUndoApplyCancel: "取消申请取消",
|
||||
OrderStatusApplyCancel: "申请取消",
|
||||
|
||||
OrderStatusUnknown: "一般事件",
|
||||
|
||||
OrderStatusNew: "新订单",
|
||||
OrderStatusAdjust: "调整单",
|
||||
OrderStatusAccepted: "已接单",
|
||||
OrderStatusFinishedPickup: "已拣货",
|
||||
OrderStatusDelivering: "配送中",
|
||||
OrderStatusFinished: "完成",
|
||||
OrderStatusCanceled: "取消",
|
||||
OrderStatusNew: "新订单",
|
||||
OrderStatusAccepted: "已接单",
|
||||
OrderStatusFinishedPickup: "已拣货",
|
||||
OrderStatusApplyFailedGetGoods: "取货失败待审核",
|
||||
OrderStatusAgreeFailedGetGoods: "取货失败",
|
||||
OrderStatusDelivering: "配送中",
|
||||
OrderStatusDeliverFailed: "投递失败",
|
||||
OrderStatusFinished: "完成",
|
||||
OrderStatusCanceled: "取消",
|
||||
}
|
||||
WaybillStatusName = map[int]string{
|
||||
WaybillStatusUnknown: "一般事件",
|
||||
@@ -159,9 +164,10 @@ const (
|
||||
const (
|
||||
OrderStatusMsg = -100
|
||||
|
||||
OrderStatusAdjust = -65 // 原值-35 订单调整完成
|
||||
OrderStatusWait4Pay = -60 // 原值-30 下单待支付,微盟在这个时间发新订单事件
|
||||
OrderStatusApplyUrgeOrder = -55 // 原值-15
|
||||
OrderStatusRefuseFailedGetGoods = -70 // 取货失败审核驳回
|
||||
OrderStatusAdjust = -65 // 原值-35 订单调整完成
|
||||
OrderStatusWait4Pay = -60 // 原值-30 下单待支付,微盟在这个时间发新订单事件
|
||||
OrderStatusApplyUrgeOrder = -55 // 原值-15
|
||||
|
||||
OrderStatusUnlocked = -25
|
||||
OrderStatusLocked = -20
|
||||
@@ -174,7 +180,12 @@ const (
|
||||
OrderStatusNew = 5 // 新订单
|
||||
OrderStatusAccepted = 10 // 已经接单,也即待出库,待拣货
|
||||
OrderStatusFinishedPickup = 15 // 拣货完成
|
||||
OrderStatusDelivering = 20 // 开始配送,配送员已取货,从这里开始就是运单消息了
|
||||
|
||||
OrderStatusApplyFailedGetGoods = 17 // 取货失败待审核
|
||||
OrderStatusAgreeFailedGetGoods = 18 // 取货失败
|
||||
|
||||
OrderStatusDelivering = 20 // 开始配送,配送员已取货,从这里开始就是运单消息了
|
||||
OrderStatusDeliverFailed = 25 // 投递失败
|
||||
|
||||
OrderStatusEndBegin = 100 // 以下的状态就是结束状态
|
||||
OrderStatusFinished = 110 // 订单已完成
|
||||
@@ -187,18 +198,24 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
WaybillStatusUnknown = 0
|
||||
WaybillStatusRefuseFailedGetGoods = -70
|
||||
WaybillStatusUnknown = 0
|
||||
|
||||
WaybillStatusNew = 5
|
||||
WaybillStatusAcceptCanceled = 8
|
||||
WaybillStatusAccepted = 10
|
||||
WaybillStatusCourierArrived = 15 // 此状态是可选的,明确写出来是因为还是较重要的状态,但业务逻辑不应依赖此状态
|
||||
WaybillStatusDelivering = 20
|
||||
|
||||
WaybillStatusApplyFailedGetGoods = 17 // 取货失败待审核
|
||||
WaybillStatusAgreeFailedGetGoods = 18 // 取货失败
|
||||
|
||||
WaybillStatusDelivering = 20
|
||||
WaybillStatusDeliverFailed = 25
|
||||
|
||||
WaybillStatusEndBegin = 100 // 以下的状态就是结束状态
|
||||
WaybillStatusDelivered = 105
|
||||
WaybillStatusDelivered = 105 // todo 这个应该改为110,与订单对应
|
||||
WaybillStatusCanceled = 115
|
||||
WaybillStatusFailed = 120
|
||||
WaybillStatusFailed = 120 // todo 这个应该要去掉
|
||||
WaybillStatusNeverSend = 125 // 这个状态指的是平台方不愿意配送,门店自己想办法。与WaybillStatusAcceptCanceled不一样,WaybillStatusAcceptCanceled可能之后还会尝试配送
|
||||
)
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ const (
|
||||
|
||||
ServerMsgPing = "ping"
|
||||
|
||||
ServerMsgNewOrder = "newOrder"
|
||||
ServerMsgUserApplyCancel = "userApplyCancel"
|
||||
ServerMsgNewOrder = "newOrder"
|
||||
ServerMsgKeyOrderStatusChanged = "keyOrderStatusChanged" // 重要订单状态变化
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -165,11 +165,11 @@ func OnNewOrder(order *model.GoodsOrder) {
|
||||
})
|
||||
}
|
||||
|
||||
func OnUserApplyCancel(order *model.GoodsOrder) {
|
||||
globals.SugarLogger.Debugf("msghub OnUserApplyCancel, order:%s", utils.Format4Output(order, false))
|
||||
func OnKeyOrderStatusChanged(order *model.GoodsOrder) {
|
||||
globals.SugarLogger.Debugf("msghub OnKeyOrderStatusChanged, order:%s", utils.Format4Output(order, false))
|
||||
utils.CallFuncAsync(func() {
|
||||
msgChan <- &ServerMsg{
|
||||
Type: ServerMsgUserApplyCancel,
|
||||
Type: ServerMsgKeyOrderStatusChanged,
|
||||
StoreID: jxutils.GetSaleStoreIDFromOrder(order),
|
||||
MsgData: 1,
|
||||
// MsgData: []*model.GoodsOrderExt{
|
||||
|
||||
@@ -142,6 +142,10 @@ type IPurchasePlatformHandler interface {
|
||||
AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptIt bool, userName string) (err error)
|
||||
PickupGoods(order *model.GoodsOrder, isSelfDelivery bool, userName string) (err error)
|
||||
|
||||
AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error)
|
||||
CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) // 取货失败后再次招唤平台配送
|
||||
ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) // 投递失败后确认收到退货
|
||||
|
||||
// 将订单从购物平台配送转为自送
|
||||
Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error)
|
||||
|
||||
|
||||
@@ -183,6 +183,18 @@ func (p *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bo
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 拣货失败后再次招唤平台配送
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 投递失败后确认收到退货
|
||||
return err
|
||||
}
|
||||
|
||||
// 将订单从购物平台配送转为自送
|
||||
func (p *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) {
|
||||
globals.SugarLogger.Debugf("ebai Swtich2SelfDeliver orderID:%s", order.VendorOrderID)
|
||||
|
||||
@@ -292,6 +292,18 @@ func (c *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 拣货失败后再次招唤平台配送
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 投递失败后确认收到退货
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) {
|
||||
// if globals.EnableElmStoreWrite {
|
||||
// err = api.ElmAPI.DeliveryBySelfLite(order.VendorOrderID)
|
||||
|
||||
@@ -248,6 +248,27 @@ func (c *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bo
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error) {
|
||||
if globals.EnableStoreWrite {
|
||||
err = api.JdAPI.ReceiveFailedAudit(order.VendorOrderID, isAcceptIt, ctx.GetUserName(), "")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 拣货失败后再次招唤平台配送
|
||||
if globals.EnableStoreWrite {
|
||||
err = api.JdAPI.UrgeDispatching(order.VendorOrderID, ctx.GetUserName())
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 投递失败后确认收到退货
|
||||
if globals.EnableStoreWrite {
|
||||
err = api.JdAPI.ConfirmReceiveGoods(order.VendorOrderID)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) {
|
||||
globals.SugarLogger.Debugf("jd Swtich2SelfDeliver orderID:%s", order.VendorOrderID)
|
||||
if globals.EnableStoreWrite {
|
||||
|
||||
@@ -34,12 +34,18 @@ func (c *PurchaseHandler) onWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (re
|
||||
order.Status = model.WaybillStatusAcceptCanceled
|
||||
case jdapi.DeliveryStatusCourierArrived:
|
||||
order.Status = model.WaybillStatusCourierArrived
|
||||
// case jdapi.DeliveryStatusFailedGetGoodsWaiting:
|
||||
// order.Status = model.WaybillStatusApplyFailedGetGoods
|
||||
// case jdapi.DeliveryStatusFailedGetGoodsRejected:
|
||||
// order.Status = model.WaybillStatusRefuseFailedGetGoods
|
||||
// case jdapi.DeliveryStatusFailedGetGoods:
|
||||
// order.Status = model.WaybillStatusAgreeFailedGetGoods
|
||||
case jdapi.DeliveryStatusGotGoods:
|
||||
order.Status = model.WaybillStatusDelivering
|
||||
// case jdapi.DeliveryStatusFailedDelivery:
|
||||
// order.Status = model.WaybillStatusDeliverFailed
|
||||
case jdapi.DeliveryStatusFinished:
|
||||
order.Status = model.WaybillStatusDelivered
|
||||
case jdapi.DeliveryStatusFailedDelivery, jdapi.DeliveryStatusFailedGetGoods: // todo 取货失败需不需要当成运单失败?
|
||||
order.Status = model.WaybillStatusFailed
|
||||
default:
|
||||
order.Status = model.WaybillStatusUnknown
|
||||
}
|
||||
|
||||
@@ -279,6 +279,18 @@ func (c *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bo
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 拣货失败后再次招唤平台配送
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 投递失败后确认收到退货
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) {
|
||||
globals.SugarLogger.Debugf("mtwm Swtich2SelfDeliver orderID:%s", order.VendorOrderID)
|
||||
if globals.EnableMtwmStoreWrite {
|
||||
|
||||
@@ -198,6 +198,18 @@ func (p *PurchaseHandler) PickupGoods(order *model.GoodsOrder, isSelfDelivery bo
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) AcceptOrRefuseFailedGetOrder(ctx *jxcontext.Context, order *model.GoodsOrder, isAcceptIt bool) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) CallCourier(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 拣货失败后再次招唤平台配送
|
||||
return err
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) ConfirmReceiveGoods(ctx *jxcontext.Context, order *model.GoodsOrder) (err error) { // 投递失败后确认收到退货
|
||||
return err
|
||||
}
|
||||
|
||||
// 将订单从购物平台配送转为自送
|
||||
func (p *PurchaseHandler) Swtich2SelfDeliver(order *model.GoodsOrder, userName string) (err error) {
|
||||
globals.SugarLogger.Debugf("wsc Swtich2SelfDeliver orderID:%s", order.VendorOrderID)
|
||||
|
||||
@@ -402,3 +402,59 @@ func (c *OrderController) CancelOrder() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 审核取货失败
|
||||
// @Description 审核取货失败
|
||||
// @Param token header string true "认证token"
|
||||
// @Param vendorOrderID formData string true "订单ID"
|
||||
// @Param vendorID formData int true "订单所属厂商ID)"
|
||||
// @Param acceptIt formData bool true "是否批准"
|
||||
// @Param reason formData string false "原因"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /AcceptOrRefuseFailedGetOrder [put]
|
||||
func (c *OrderController) AcceptOrRefuseFailedGetOrder() {
|
||||
c.callAcceptOrRefuseFailedGetOrder(func(params *tOrderAcceptOrRefuseFailedGetOrderParams) (retVal interface{}, errCode string, err error) {
|
||||
order, err := partner.CurOrderManager.LoadOrder(params.VendorOrderID, params.VendorID)
|
||||
if err == nil {
|
||||
err = defsch.FixedScheduler.AcceptOrRefuseFailedGetOrder(params.Ctx, order, params.AcceptIt, params.Reason)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 取货失败后再次招唤平台配送
|
||||
// @Description 取货失败后再次招唤平台配送
|
||||
// @Param token header string true "认证token"
|
||||
// @Param vendorOrderID formData string true "订单ID"
|
||||
// @Param vendorID formData int true "订单所属厂商ID)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CallPMCourier [put]
|
||||
func (c *OrderController) CallPMCourier() {
|
||||
c.callCallPMCourier(func(params *tOrderCallPMCourierParams) (retVal interface{}, errCode string, err error) {
|
||||
order, err := partner.CurOrderManager.LoadOrder(params.VendorOrderID, params.VendorID)
|
||||
if err == nil {
|
||||
err = defsch.FixedScheduler.CallPMCourier(params.Ctx, order)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 投递失败后确认收到退货
|
||||
// @Description 投递失败后确认收到退货
|
||||
// @Param token header string true "认证token"
|
||||
// @Param vendorOrderID formData string true "订单ID"
|
||||
// @Param vendorID formData int true "订单所属厂商ID)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /ConfirmReceiveGoods [put]
|
||||
func (c *OrderController) ConfirmReceiveGoods() {
|
||||
c.callConfirmReceiveGoods(func(params *tOrderConfirmReceiveGoodsParams) (retVal interface{}, errCode string, err error) {
|
||||
order, err := partner.CurOrderManager.LoadOrder(params.VendorOrderID, params.VendorID)
|
||||
if err == nil {
|
||||
err = defsch.FixedScheduler.ConfirmReceiveGoods(params.Ctx, order)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -511,6 +511,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "AcceptOrRefuseFailedGetOrder",
|
||||
Router: `/AcceptOrRefuseFailedGetOrder`,
|
||||
AllowHTTPMethods: []string{"put"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "AdjustOrder",
|
||||
@@ -520,6 +529,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "CallPMCourier",
|
||||
Router: `/CallPMCourier`,
|
||||
AllowHTTPMethods: []string{"put"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "CancelAll3rdWaybills",
|
||||
@@ -538,6 +556,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "ConfirmReceiveGoods",
|
||||
Router: `/ConfirmReceiveGoods`,
|
||||
AllowHTTPMethods: []string{"put"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:OrderController"],
|
||||
beego.ControllerComments{
|
||||
Method: "CreateWaybillOnProviders",
|
||||
|
||||
Reference in New Issue
Block a user