1
This commit is contained in:
parent
0cbc41a062
commit
05c51b9dcf
@ -3,5 +3,7 @@
|
||||
"port": 3306,
|
||||
"user": "root",
|
||||
"passwd": "keji178",
|
||||
"database": "bcnft_dev"
|
||||
"database": "bcnft_dev",
|
||||
"max_open_conns": 1,
|
||||
"max_idle_conns": 1
|
||||
}
|
||||
|
@ -49,7 +49,10 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.MailDb.GetById(0).GetUser(),
|
||||
mt.Table.MailDb.GetById(0).GetPasswd(),
|
||||
mt.Table.MailDb.GetById(0).GetDatabase(),
|
||||
3)
|
||||
1,
|
||||
mt.Table.MailDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.MailDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
f5.GetJsStyleDb().RegisterDataSource(
|
||||
constant.MAIL_DB,
|
||||
mt.Table.MailDb.GetById(0).GetHost(),
|
||||
@ -57,7 +60,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.MailDb.GetById(0).GetUser(),
|
||||
mt.Table.MailDb.GetById(0).GetPasswd(),
|
||||
mt.Table.MailDb.GetById(0).GetDatabase(),
|
||||
1)
|
||||
1,
|
||||
mt.Table.MailDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.MailDb.GetById(0).GetMaxIdleConns())
|
||||
}
|
||||
|
||||
func (this *app) HasTask() bool {
|
||||
|
@ -19,6 +19,8 @@ type MailDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -96,6 +98,22 @@ func (this *MailDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *MailDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *MailDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *MailDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *MailDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *Config) GetGameapiUrl() string {
|
||||
return this.gameapi_url
|
||||
}
|
||||
@ -125,6 +143,8 @@ func (this *MailDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *Config) LoadFromKv(kv map[string]interface{}) {
|
||||
|
@ -16,6 +16,8 @@ message MailDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message Config
|
||||
|
@ -46,7 +46,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.NftDb.GetById(0).GetUser(),
|
||||
mt.Table.NftDb.GetById(0).GetPasswd(),
|
||||
mt.Table.NftDb.GetById(0).GetDatabase(),
|
||||
3)
|
||||
1,
|
||||
mt.Table.NftDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.NftDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
f5.GetGoStyleDb().RegisterDataSource(
|
||||
constant.BCEVENT_DB,
|
||||
@ -55,7 +57,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.NftEventDb.GetById(0).GetUser(),
|
||||
mt.Table.NftEventDb.GetById(0).GetPasswd(),
|
||||
mt.Table.NftEventDb.GetById(0).GetDatabase(),
|
||||
3)
|
||||
1,
|
||||
mt.Table.NftEventDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.NftEventDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
f5.GetGoStyleDb().RegisterDataSource(
|
||||
constant.GAME_DB,
|
||||
@ -64,7 +68,9 @@ func (this *app) registerDataSources() {
|
||||
mt.Table.GameDb.GetById(0).GetUser(),
|
||||
mt.Table.GameDb.GetById(0).GetPasswd(),
|
||||
mt.Table.GameDb.GetById(0).GetDatabase(),
|
||||
3)
|
||||
1,
|
||||
mt.Table.GameDb.GetById(0).GetMaxOpenConns(),
|
||||
mt.Table.GameDb.GetById(0).GetMaxIdleConns())
|
||||
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,8 @@ type NftDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -30,6 +32,8 @@ type NftEventDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -41,6 +45,8 @@ type GameDb struct {
|
||||
user string
|
||||
passwd string
|
||||
database string
|
||||
max_open_conns int32
|
||||
max_idle_conns int32
|
||||
|
||||
_flags1_ uint64
|
||||
_flags2_ uint64
|
||||
@ -151,6 +157,22 @@ func (this *NftDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *NftDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *NftDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *NftDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *NftDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *NftEventDb) GetHost() string {
|
||||
return this.host
|
||||
}
|
||||
@ -191,6 +213,22 @@ func (this *NftEventDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *NftEventDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *NftEventDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *NftEventDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *NftEventDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *GameDb) GetHost() string {
|
||||
return this.host
|
||||
}
|
||||
@ -231,6 +269,22 @@ func (this *GameDb) HasDatabase() bool {
|
||||
return (this._flags1_ & (uint64(1) << 5)) > 0
|
||||
}
|
||||
|
||||
func (this *GameDb) GetMaxOpenConns() int32 {
|
||||
return this.max_open_conns
|
||||
}
|
||||
|
||||
func (this *GameDb) HasMaxOpenConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 6)) > 0
|
||||
}
|
||||
|
||||
func (this *GameDb) GetMaxIdleConns() int32 {
|
||||
return this.max_idle_conns
|
||||
}
|
||||
|
||||
func (this *GameDb) HasMaxIdleConns() bool {
|
||||
return (this._flags1_ & (uint64(1) << 7)) > 0
|
||||
}
|
||||
|
||||
func (this *Config) GetGameapiUrl() string {
|
||||
return this.gameapi_url
|
||||
}
|
||||
@ -332,6 +386,8 @@ func (this *NftDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *NftEventDb) LoadFromKv(kv map[string]interface{}) {
|
||||
@ -340,6 +396,8 @@ func (this *NftEventDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *GameDb) LoadFromKv(kv map[string]interface{}) {
|
||||
@ -348,6 +406,8 @@ func (this *GameDb) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.user, "user", &this._flags1_, 3, kv)
|
||||
f5.ReadMetaTableField(&this.passwd, "passwd", &this._flags1_, 4, kv)
|
||||
f5.ReadMetaTableField(&this.database, "database", &this._flags1_, 5, kv)
|
||||
f5.ReadMetaTableField(&this.max_open_conns, "max_open_conns", &this._flags1_, 6, kv)
|
||||
f5.ReadMetaTableField(&this.max_idle_conns, "max_idle_conns", &this._flags1_, 7, kv)
|
||||
}
|
||||
|
||||
func (this *Config) LoadFromKv(kv map[string]interface{}) {
|
||||
|
@ -16,6 +16,8 @@ message NftDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message NftEventDb
|
||||
@ -25,6 +27,8 @@ message NftEventDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message GameDb
|
||||
@ -34,6 +38,8 @@ message GameDb
|
||||
optional string user = 3;
|
||||
optional string passwd = 4;
|
||||
optional string database = 5;
|
||||
optional int32 max_open_conns = 6;
|
||||
optional int32 max_idle_conns = 7;
|
||||
}
|
||||
|
||||
message Config
|
||||
|
Loading…
x
Reference in New Issue
Block a user