From 39f390cb1fbad4678e7c4c0233f3862e7c41ff57 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 15 Mar 2019 11:14:33 +0800 Subject: [PATCH] - wrap StartRefreshComment and StartRefreshEbaiRealMobile by ReallyCallPlatformAPI --- business/jxstore/misc/misc.go | 9 ++++++--- business/partner/purchase/ebai/order_comment.go | 8 +++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 144566e91..1aee07076 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -6,12 +6,15 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/partner/purchase/ebai" + "git.rosy.net.cn/jx-callback/globals" ) func StartRefreshEbaiRealMobile() { - utils.AfterFuncWithRecover(5*time.Second, func() { - RefreshEbaiRealMobile() - }) + if globals.ReallyCallPlatformAPI { + utils.AfterFuncWithRecover(5*time.Second, func() { + RefreshEbaiRealMobile() + }) + } } func RefreshEbaiRealMobile() { diff --git a/business/partner/purchase/ebai/order_comment.go b/business/partner/purchase/ebai/order_comment.go index 9d2f06335..3b7f00d95 100644 --- a/business/partner/purchase/ebai/order_comment.go +++ b/business/partner/purchase/ebai/order_comment.go @@ -21,9 +21,11 @@ const ( ) func (c *PurchaseHandler) StartRefreshComment() { - utils.AfterFuncWithRecover(5*time.Second, func() { - c.refreshCommentOnce() - }) + if globals.ReallyCallPlatformAPI { + utils.AfterFuncWithRecover(5*time.Second, func() { + c.refreshCommentOnce() + }) + } } func (c *PurchaseHandler) refreshCommentOnce() {