- 京东handler不直接依赖api.JdAPI

This commit is contained in:
gazebo
2019-08-28 14:25:29 +08:00
parent da6fdd4c8e
commit cf4202a41b
13 changed files with 113 additions and 112 deletions

View File

@@ -6,7 +6,7 @@ import (
"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/api"
"git.rosy.net.cn/jx-callback/globals"
)
type PurchaseHandler struct {
@@ -18,7 +18,8 @@ var (
)
func init() {
if api.JdAPI != nil {
globals.SugarLogger.Debug("init jd")
if getAPI("") != nil {
curPurchaseHandler = new(PurchaseHandler)
partner.RegisterPurchasePlatform(curPurchaseHandler)
}