- move Cacher from globals to api

- vendorPromotionID for CreatePromotion
- LockPromotionSkus
This commit is contained in:
gazebo
2018-11-07 13:17:25 +08:00
parent ee9b84bd80
commit 9bb30affc4
12 changed files with 291 additions and 163 deletions

View File

@@ -2,8 +2,6 @@ package globals
import (
"git.rosy.net.cn/baseapi"
"git.rosy.net.cn/jx-callback/business/jxutils/cache"
"git.rosy.net.cn/jx-callback/business/jxutils/cache/redis"
"github.com/astaxie/beego"
"github.com/astaxie/beego/logs"
_ "github.com/go-sql-driver/mysql" // import your used driver
@@ -22,8 +20,6 @@ var (
SugarLogger *zap.SugaredLogger
Cacher cache.ICacher
AliKey string
AliSecret string
@@ -51,8 +47,6 @@ func Init() {
ReallySendWeixinMsg = beego.BConfig.RunMode == "prod"
ReallyCallPlatformAPI = true
Cacher = redis.New(beego.AppConfig.DefaultString("redisHost", "localhost"), beego.AppConfig.DefaultInt("redisPort", 0), beego.AppConfig.DefaultString("redisPassword", ""))
AliKey = beego.AppConfig.DefaultString("aliKey", "")
AliSecret = beego.AppConfig.DefaultString("aliSecret", "")