- add jxcontext.Context to all public API.

This commit is contained in:
gazebo
2018-10-21 22:41:11 +08:00
parent 5d2bf9a510
commit b51ceb3d1d
22 changed files with 228 additions and 200 deletions

View File

@@ -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 {