- 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,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
}