- add jxcontext.Context to all public API.
This commit is contained in:
@@ -3,6 +3,7 @@ package basesch
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/model/legacymodel2"
|
||||
@@ -11,7 +12,7 @@ import (
|
||||
"github.com/astaxie/beego/orm"
|
||||
)
|
||||
|
||||
func (c *BaseScheduler) CreateWaybillOnProviders(vendorOrderID string, vendorID int, userName string) (bills []*model.Waybill, err error) {
|
||||
func (c *BaseScheduler) CreateWaybillOnProviders(ctx *jxcontext.Context, vendorOrderID string, vendorID int, userName string) (bills []*model.Waybill, err error) {
|
||||
globals.SugarLogger.Infof("CreateWaybillOnProviders orderID:%s userName:%s", vendorOrderID, userName)
|
||||
order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, vendorID)
|
||||
if err == nil {
|
||||
@@ -31,7 +32,7 @@ func (c *BaseScheduler) CreateWaybillOnProviders(vendorOrderID string, vendorID
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func (c *BaseScheduler) SelfDeliveredAndUpdateStatus(vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
func (c *BaseScheduler) SelfDeliveredAndUpdateStatus(ctx *jxcontext.Context, vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
globals.SugarLogger.Infof("SelfDeliveredAndUpdateStatus orderID:%s userName:%s", vendorOrderID, userName)
|
||||
order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, vendorID)
|
||||
if err == nil {
|
||||
@@ -52,7 +53,7 @@ func (c *BaseScheduler) SelfDeliveredAndUpdateStatus(vendorOrderID string, vendo
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *BaseScheduler) PickupGoodsAndUpdateStatus(vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
func (c *BaseScheduler) PickupGoodsAndUpdateStatus(ctx *jxcontext.Context, vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
globals.SugarLogger.Infof("PickupGoodsAndUpdateStatus orderID:%s userName:%s", vendorOrderID, userName)
|
||||
order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, vendorID)
|
||||
if err == nil {
|
||||
|
||||
@@ -3,12 +3,13 @@ package defsch
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
func (s *DefScheduler) SelfDeliveringAndUpdateStatus(vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
func (s *DefScheduler) SelfDeliveringAndUpdateStatus(ctx *jxcontext.Context, vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
globals.SugarLogger.Infof("SelfDeliveringAndUpdateStatus orderID:%s userName:%s", vendorOrderID, userName)
|
||||
status := &model.OrderStatus{
|
||||
VendorOrderID: vendorOrderID,
|
||||
@@ -47,9 +48,9 @@ func (s *DefScheduler) SelfDeliveringAndUpdateStatus(vendorOrderID string, vendo
|
||||
return err
|
||||
}
|
||||
|
||||
func (s *DefScheduler) SelfDeliveringAndUpdateStatusExt(vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
func (s *DefScheduler) SelfDeliveringAndUpdateStatusExt(ctx *jxcontext.Context, vendorOrderID string, vendorID int, userName string) (err error) {
|
||||
jxutils.CallMsgHandler(func() {
|
||||
err = s.SelfDeliveringAndUpdateStatus(vendorOrderID, vendorID, userName)
|
||||
err = s.SelfDeliveringAndUpdateStatus(ctx, vendorOrderID, vendorID, userName)
|
||||
}, jxutils.ComposeUniversalOrderID(vendorOrderID, vendorID))
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user