1
This commit is contained in:
parent
87489f09d3
commit
2dae0138cb
@ -40,3 +40,8 @@ func (this *guild) loadFromDb(ds *f5.DataSet) {
|
|||||||
this.createTime = q5.ToInt32(ds.GetByName("createtime"))
|
this.createTime = q5.ToInt32(ds.GetByName("createtime"))
|
||||||
this.modifyTime = q5.ToInt32(ds.GetByName("modifytime"))
|
this.modifyTime = q5.ToInt32(ds.GetByName("modifytime"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func newGuild() *guild {
|
||||||
|
p := new(guild)
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
@ -32,27 +32,22 @@ func (this *guildMgr) UnInit() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *guildMgr) loadFromDB() {
|
func (this *guildMgr) loadFromDB() {
|
||||||
/*
|
|
||||||
f5.GetSysLog().Info("friendMgr.loadFriendships begin")
|
f5.GetSysLog().Info("friendMgr.loadFriendships begin")
|
||||||
lastIdx := f5.GetJsStyleDb().SyncBatchLoadFullTable(
|
lastIdx := f5.GetJsStyleDb().SyncBatchLoadFullTable(
|
||||||
constant.FRIEND_DB,
|
constant.FRIEND_DB,
|
||||||
"SELECT * FROM t_guild idx > %d AND deleted = 0",
|
"SELECT * FROM t_guild idx > %d AND deleted = 0",
|
||||||
func (ds *f5.DataSet) {
|
func (ds *f5.DataSet) {
|
||||||
guildId := ds.GetByName("guild_id")
|
p := newGuild()
|
||||||
guildName := ds.GetByName("guild_name")
|
this.idHash[p.guildId] = p
|
||||||
ownerId := q5.ToInt32(ds.GetByName("owner_id"))
|
this.nameHash[p.guildName] = p
|
||||||
//this.addFriendShip(accountId1, accountId2, addTime)
|
|
||||||
},
|
},
|
||||||
func (err error) {
|
func (err error) {
|
||||||
panic(fmt.Sprintf("friendMgr.loadFriendships dberror:%s", err))
|
panic(fmt.Sprintf("friendMgr.loadFriendships dberror:%s", err))
|
||||||
})
|
})
|
||||||
*/
|
|
||||||
/*
|
|
||||||
f5.GetSysLog().Info("friendMgr.loadFriendships end lastIdx:%d friendNum:%d blackNum:%d",
|
f5.GetSysLog().Info("friendMgr.loadFriendships end lastIdx:%d friendNum:%d blackNum:%d",
|
||||||
lastIdx,
|
lastIdx,
|
||||||
len(this.friendHash),
|
len(this.idHash),
|
||||||
len(this.blackHash))
|
len(this.nameHash))
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *guildMgr) isNameTooLong(name string, maxNum int) bool {
|
func (this *guildMgr) isNameTooLong(name string, maxNum int) bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user