|
@@ -4,30 +4,6 @@
|
|
|
package init
|
|
|
|
|
|
import (
|
|
|
-<<<<<<< HEAD
|
|
|
-<<<<<<< HEAD
|
|
|
- "app.yhyue.com/moapp/jybase/esv1"
|
|
|
- "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
- "app.yhyue.com/moapp/jybase/mysql"
|
|
|
- "app.yhyue.com/moapp/jybase/redis"
|
|
|
- "github.com/zeromicro/go-zero/core/logx"
|
|
|
- "jyBXBase/entity"
|
|
|
- "strings"
|
|
|
-)
|
|
|
-
|
|
|
-var (
|
|
|
- MainMysql *mysql.Mysql
|
|
|
- BaseServiceMysql *mysql.Mysql
|
|
|
- Mgo mongodb.MongodbSim
|
|
|
- MgoEnt mongodb.MongodbSim
|
|
|
- MgoBidding mongodb.MongodbSim
|
|
|
-=======
|
|
|
- "strings"
|
|
|
-
|
|
|
- "github.com/zeromicro/go-zero/core/logx"
|
|
|
-
|
|
|
-=======
|
|
|
->>>>>>> feature/v1.1.5
|
|
|
"jyBXBase/entity"
|
|
|
"strings"
|
|
|
|
|
@@ -47,10 +23,6 @@ var (
|
|
|
Mgo mongodb.MongodbSim
|
|
|
MgoEnt mongodb.MongodbSim
|
|
|
MgoBidding mongodb.MongodbSim
|
|
|
-<<<<<<< HEAD
|
|
|
->>>>>>> master
|
|
|
-=======
|
|
|
->>>>>>> feature/v1.1.5
|
|
|
)
|
|
|
|
|
|
//
|
|
@@ -92,36 +64,6 @@ func MongoDBInit(em *entity.Mongo) {
|
|
|
|
|
|
//
|
|
|
func MysqlInit(em *entity.Mysql) {
|
|
|
-<<<<<<< HEAD
|
|
|
-<<<<<<< HEAD
|
|
|
- //初始化 mysql-main
|
|
|
- if em.Main.Address != "" {
|
|
|
- logx.Info("--初始化 main mysql--")
|
|
|
- MainMysql = &mysql.Mysql{
|
|
|
- Address: em.Main.Address,
|
|
|
- UserName: em.Main.UserName,
|
|
|
- PassWord: em.Main.Password,
|
|
|
- DBName: em.Main.DbName,
|
|
|
- MaxOpenConns: em.Main.MaxOpenConns,
|
|
|
- MaxIdleConns: em.Main.MaxIdleConns,
|
|
|
- }
|
|
|
- MainMysql.Init()
|
|
|
- }
|
|
|
- //初始化 mysql-BaseService
|
|
|
- if em.BaseService.Address != "" {
|
|
|
- logx.Info("--初始化 推送 mysql--")
|
|
|
- BaseServiceMysql = &mysql.Mysql{
|
|
|
- Address: em.BaseService.Address,
|
|
|
- UserName: em.BaseService.UserName,
|
|
|
- PassWord: em.BaseService.Password,
|
|
|
- DBName: em.BaseService.DbName,
|
|
|
- MaxOpenConns: em.BaseService.MaxOpenConns,
|
|
|
- MaxIdleConns: em.BaseService.MaxIdleConns,
|
|
|
- }
|
|
|
- BaseServiceMysql.Init()
|
|
|
- }
|
|
|
-=======
|
|
|
-=======
|
|
|
//初始化 mysql-main
|
|
|
if em.Main.Address != "" {
|
|
|
logx.Info("--初始化 main mysql--")
|
|
@@ -135,7 +77,21 @@ func MysqlInit(em *entity.Mysql) {
|
|
|
}
|
|
|
MainMysql.Init()
|
|
|
}
|
|
|
->>>>>>> feature/v1.1.5
|
|
|
+ //初始化 mysql-BaseService
|
|
|
+
|
|
|
+ //初始化 mysql-main
|
|
|
+ if em.Main.Address != "" {
|
|
|
+ logx.Info("--初始化 main mysql--")
|
|
|
+ MainMysql = &mysql.Mysql{
|
|
|
+ Address: em.Main.Address,
|
|
|
+ UserName: em.Main.UserName,
|
|
|
+ PassWord: em.Main.Password,
|
|
|
+ DBName: em.Main.DbName,
|
|
|
+ MaxOpenConns: em.Main.MaxOpenConns,
|
|
|
+ MaxIdleConns: em.Main.MaxIdleConns,
|
|
|
+ }
|
|
|
+ MainMysql.Init()
|
|
|
+ }
|
|
|
//初始化 mysql-main
|
|
|
if em.Main.Address != "" {
|
|
|
logx.Info("--初始化 main mysql--")
|
|
@@ -200,10 +156,6 @@ func MysqlInit(em *entity.Mysql) {
|
|
|
}
|
|
|
BaseServiceMysql.Init()
|
|
|
}
|
|
|
-<<<<<<< HEAD
|
|
|
->>>>>>> master
|
|
|
-=======
|
|
|
->>>>>>> feature/v1.1.5
|
|
|
}
|
|
|
|
|
|
//
|