This commit is contained in:
aozhiwei 2024-04-02 08:33:43 +08:00
parent 87489f09d3
commit 2dae0138cb
2 changed files with 10 additions and 10 deletions

View File

@ -40,3 +40,8 @@ func (this *guild) loadFromDb(ds *f5.DataSet) {
this.createTime = q5.ToInt32(ds.GetByName("createtime"))
this.modifyTime = q5.ToInt32(ds.GetByName("modifytime"))
}
func newGuild() *guild {
p := new(guild)
return p
}

View File

@ -32,27 +32,22 @@ func (this *guildMgr) UnInit() {
}
func (this *guildMgr) loadFromDB() {
/*
f5.GetSysLog().Info("friendMgr.loadFriendships begin")
lastIdx := f5.GetJsStyleDb().SyncBatchLoadFullTable(
constant.FRIEND_DB,
"SELECT * FROM t_guild idx > %d AND deleted = 0",
func (ds *f5.DataSet) {
guildId := ds.GetByName("guild_id")
guildName := ds.GetByName("guild_name")
ownerId := q5.ToInt32(ds.GetByName("owner_id"))
//this.addFriendShip(accountId1, accountId2, addTime)
p := newGuild()
this.idHash[p.guildId] = p
this.nameHash[p.guildName] = p
},
func (err error) {
panic(fmt.Sprintf("friendMgr.loadFriendships dberror:%s", err))
})
*/
/*
f5.GetSysLog().Info("friendMgr.loadFriendships end lastIdx:%d friendNum:%d blackNum:%d",
lastIdx,
len(this.friendHash),
len(this.blackHash))
*/
len(this.idHash),
len(this.nameHash))
}
func (this *guildMgr) isNameTooLong(name string, maxNum int) bool {