diff --git a/server/imserver_new/common/types.go b/server/imserver_new/common/types.go index 4fdf8de5..299f5423 100644 --- a/server/imserver_new/common/types.go +++ b/server/imserver_new/common/types.go @@ -111,6 +111,6 @@ type DbLogMgr interface { FriendAdd(string, string) FriendDel(string, string) - GuildClearEmptyStart(string) - GuildClearEmptyEnd(string) + GuildClearEmptyStart(string, string) + GuildClearEmptyEnd(string, string) } diff --git a/server/imserver_new/guild/guild.go b/server/imserver_new/guild/guild.go index 45ff32c6..0a1593fd 100644 --- a/server/imserver_new/guild/guild.go +++ b/server/imserver_new/guild/guild.go @@ -12,7 +12,6 @@ import ( type guild struct { guildId string guildName string - ownerId string creatorId string badge int32 notice string @@ -40,7 +39,6 @@ func (this *guild) GetMemberNum() int32 { func (this *guild) loadFromDb(ds *f5.DataSet) { this.guildId = ds.GetByName("guild_id") this.guildName = ds.GetByName("guild_name") - this.ownerId = ds.GetByName("owner_id") this.creatorId = ds.GetByName("creator_id") this.badge = q5.ToInt32(ds.GetByName("badge")) this.notice = ds.GetByName("notice") @@ -135,7 +133,7 @@ func (this *guild) AsyncFillMFGuild(pbGuild *cs.MFGuild, cb func(int32, string)) pbGuild.AutoId = proto.Int64(0) pbGuild.GuildId = proto.Int64(q5.ToInt64(this.guildId)) pbGuild.Name = proto.String(this.guildName) - pbGuild.LeaderId = proto.String(this.ownerId) + pbGuild.LeaderId = proto.String(this.getOwnerId()) pbGuild.Avatar = proto.Int32(this.badge) pbGuild.Notice = proto.String(this.notice) pbGuild.JoinCond = proto.Int32(this.joinCondType) @@ -257,12 +255,16 @@ func (this *guild) asyncUpdateOwner(ownerId string, cb func(int32, string)) { cb(500, "server internal error") return } - this.ownerId = ownerId cb(0, "") return }) } +func (this *guild) getOwnerId() string { + ownerId := "" + return ownerId +} + func newGuild() *guild { p := new(guild) p.idHash = make(map[string]*member) diff --git a/server/imserver_new/guild/guildmgr.go b/server/imserver_new/guild/guildmgr.go index e2a50c24..020fe89c 100644 --- a/server/imserver_new/guild/guildmgr.go +++ b/server/imserver_new/guild/guildmgr.go @@ -243,7 +243,6 @@ func (this *guildMgr) asyncCreateGuildTask(task *f5.LockAsyncTask, { guild.guildId = guildId guild.guildName = name - guild.ownerId = accountId guild.creatorId = accountId guild.badge = avatar guild.maxMemberNum = constant.GuildMaxMembers @@ -907,7 +906,7 @@ func (this *guildMgr) clearEmptyGuild() { for _, g := range(emptyGuilds) { delete(this.idHash, g.guildId) delete(this.nameHash, g.guildName) - GetDbLogMgr().GuildClearEmptyStart(g.guildId) + GetDbLogMgr().GuildClearEmptyStart(g.guildId, g.guildName) } }