- wrap StartRefreshComment and StartRefreshEbaiRealMobile by ReallyCallPlatformAPI
This commit is contained in:
@@ -6,13 +6,16 @@ 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() {
|
||||
if globals.ReallyCallPlatformAPI {
|
||||
utils.AfterFuncWithRecover(5*time.Second, func() {
|
||||
RefreshEbaiRealMobile()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func RefreshEbaiRealMobile() {
|
||||
ebai.CurPurchaseHandler.RefreshRealMobile(jxcontext.AdminCtx, time.Now().Add(-6*time.Hour), utils.DefaultTimeValue, true, true)
|
||||
|
||||
@@ -21,10 +21,12 @@ const (
|
||||
)
|
||||
|
||||
func (c *PurchaseHandler) StartRefreshComment() {
|
||||
if globals.ReallyCallPlatformAPI {
|
||||
utils.AfterFuncWithRecover(5*time.Second, func() {
|
||||
c.refreshCommentOnce()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) refreshCommentOnce() {
|
||||
c.RefreshComment(time.Now().Add(-RefreshCommentTime), time.Now())
|
||||
|
||||
Reference in New Issue
Block a user