1
This commit is contained in:
parent
eb1ab5512b
commit
b8908835b4
@ -47,26 +47,6 @@ func (this *app) Update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *app) registerDataSources() {
|
func (this *app) registerDataSources() {
|
||||||
f5.GetJsStyleDb().RegisterDataSource(
|
|
||||||
constant.GAME_DB,
|
|
||||||
mt.Table.GameDb.GetById(0).GetHost(),
|
|
||||||
mt.Table.GameDb.GetById(0).GetPort(),
|
|
||||||
mt.Table.GameDb.GetById(0).GetUser(),
|
|
||||||
mt.Table.GameDb.GetById(0).GetPasswd(),
|
|
||||||
mt.Table.GameDb.GetById(0).GetDatabase(),
|
|
||||||
1,
|
|
||||||
mt.Table.GameDb.GetById(0).GetMaxOpenConns(),
|
|
||||||
mt.Table.GameDb.GetById(0).GetMaxIdleConns())
|
|
||||||
f5.GetJsStyleDb().RegisterDataSource(
|
|
||||||
constant.FRIEND_DB,
|
|
||||||
mt.Table.FriendDb.GetById(0).GetHost(),
|
|
||||||
mt.Table.FriendDb.GetById(0).GetPort(),
|
|
||||||
mt.Table.FriendDb.GetById(0).GetUser(),
|
|
||||||
mt.Table.FriendDb.GetById(0).GetPasswd(),
|
|
||||||
mt.Table.FriendDb.GetById(0).GetDatabase(),
|
|
||||||
1,
|
|
||||||
mt.Table.FriendDb.GetById(0).GetMaxOpenConns(),
|
|
||||||
mt.Table.FriendDb.GetById(0).GetMaxIdleConns())
|
|
||||||
f5.GetApp().RegisterOrmDb(
|
f5.GetApp().RegisterOrmDb(
|
||||||
constant.ADMIN_DB,
|
constant.ADMIN_DB,
|
||||||
mt.Table.AdminDb.GetById(0).GetHost(),
|
mt.Table.AdminDb.GetById(0).GetHost(),
|
||||||
@ -141,23 +121,6 @@ func (this *app) registerDataSources() {
|
|||||||
mt.Table.ConfDb.GetById(0).GetMaxIdleConns())
|
mt.Table.ConfDb.GetById(0).GetMaxIdleConns())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *app) AddSession(accountId string) string {
|
|
||||||
/*
|
|
||||||
this.sessionLock.Lock()
|
|
||||||
defer this.sessionLock.Unlock()
|
|
||||||
uuid := f5.GetApp().NewGlobalUuid()
|
|
||||||
str := fmt.Sprintf("%s%d%s%d", accountId, uuid, randStringBytes(12), time.Now().Unix())
|
|
||||||
md5New := md5.New()
|
|
||||||
strByte := []byte(str)
|
|
||||||
md5New.Write(strByte)
|
|
||||||
md5String := hex.EncodeToString(md5New.Sum(nil))
|
|
||||||
token := accountId + "|" + md5String
|
|
||||||
this.sessionHash[accountId] = token
|
|
||||||
return token
|
|
||||||
*/
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *app) HasTask() bool {
|
func (this *app) HasTask() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ type Mail struct {
|
|||||||
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
|
UserRegStartTime int32 `gorm:"column:user_reg_start_time" json:"user_reg_start_time"`
|
||||||
UserRegEndTime int32 `gorm:"column:user_reg_end_time" json:"user_reg_end_time"`
|
UserRegEndTime int32 `gorm:"column:user_reg_end_time" json:"user_reg_end_time"`
|
||||||
Tag1 int32 `gorm:"column:tag1" json:"tag1"`
|
Tag1 int32 `gorm:"column:tag1" json:"tag1"`
|
||||||
Tag2 int32 `gorm:"column:tag2;<-:create" json:"tag2"`
|
Tag2 int32 `gorm:"column:tag2;" json:"tag2"`
|
||||||
ExpireTime int32 `gorm:"column:expiretime" json:"expiretime"`
|
ExpireTime int32 `gorm:"column:expiretime" json:"expiretime"`
|
||||||
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
|
CreateTime int32 `gorm:"column:createtime;<-:create" json:"createtime"`
|
||||||
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
ModifyTime int32 `gorm:"column:modifytime" json:"modifytime"`
|
||||||
|
2
third_party/f5
vendored
2
third_party/f5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c3814ee3afc6ef21c0e7683192044571f561009f
|
Subproject commit cf0959d4bd0cee6e8cad378defe82fd478851368
|
Loading…
x
Reference in New Issue
Block a user