This commit is contained in:
aozhiwei 2024-04-11 20:03:06 +08:00
parent d3fec7ab48
commit 48af45b579
4 changed files with 7 additions and 7 deletions

View File

@ -104,7 +104,7 @@ func (this *guild) updateByKv(kv map[int32]string) {
} }
func (this *guild) disband() { func (this *guild) disband() {
model.Guild.Delete(this.guildId, model.Guild.DeleteSoft(this.guildId,
func (err error, lastInsertId int64, rowsAffected int64) { func (err error, lastInsertId int64, rowsAffected int64) {
}) })
model.GuildApply.Clear(this.guildId, model.GuildApply.Clear(this.guildId,
@ -149,7 +149,7 @@ func (this *guild) asyncLeave(accountId string, cb func(int32, string)) {
cb(0, "") cb(0, "")
return return
} }
model.GuildMember.Delete(this.guildId, m.memberId, model.GuildMember.DeleteSoft(this.guildId, m.memberId,
func (err error, lastInsertId int64, rowsAffected int64) { func (err error, lastInsertId int64, rowsAffected int64) {
if err != nil { if err != nil {
cb(500, "server internal error") cb(500, "server internal error")
@ -173,7 +173,7 @@ func (this *guild) asyncLeave(accountId string, cb func(int32, string)) {
} }
} }
if this.GetMemberNum() <= 0 { if this.GetMemberNum() <= 0 {
model.Guild.Delete(this.guildId, model.Guild.DeleteSoft(this.guildId,
func (err error, lastInsertId int64, rowsAffected int64) { func (err error, lastInsertId int64, rowsAffected int64) {
if err != nil { if err != nil {
cb(500, "server internal error") cb(500, "server internal error")

View File

@ -541,7 +541,7 @@ func (this *guildMgr) AsyncKickout(accountId string, targetId string, cb func(in
{constant.GUILD_MEMBER_LOCK_KEY, targetId}, {constant.GUILD_MEMBER_LOCK_KEY, targetId},
}, },
func (task *f5.LockAsyncTask) { func (task *f5.LockAsyncTask) {
model.GuildMember.Delete(guild.guildId, targetId, model.GuildMember.DeleteSoft(guild.guildId, targetId,
func (err error, lastInsertId int64, rowsAffected int64) { func (err error, lastInsertId int64, rowsAffected int64) {
if err != nil { if err != nil {
cb(500, "server internal error") cb(500, "server internal error")
@ -750,7 +750,7 @@ func (this *guildMgr) clearEmptyGuild() {
for _, g := range(emptyGuilds) { for _, g := range(emptyGuilds) {
this.delGuildNoRearrangement(g) this.delGuildNoRearrangement(g)
GetDbLogMgr().GuildClearEmptyStart(g.guildId, g.guildName) GetDbLogMgr().GuildClearEmptyStart(g.guildId, g.guildName)
model.Guild.Delete(g.guildId, model.Guild.DeleteSoft(g.guildId,
func (err error, lastInsertId int64, rowsAffected int64) { func (err error, lastInsertId int64, rowsAffected int64) {
}) })
} }

View File

@ -29,7 +29,7 @@ func (this *guild) New(guildId string, guildName string, creatorId string, avata
cb) cb)
} }
func (this *guild) Delete(guildId string, func (this *guild) DeleteSoft(guildId string,
cb func (error, int64, int64)) { cb func (error, int64, int64)) {
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,

View File

@ -38,7 +38,7 @@ func (this *guildMember) Force(memberId string, guildId string, guildJob int32,
cb) cb)
} }
func (this *guildMember) Delete(guildId string, memberId string, func (this *guildMember) DeleteSoft(guildId string, memberId string,
cb func (error, int64, int64)) { cb func (error, int64, int64)) {
f5.GetJsStyleDb().Update( f5.GetJsStyleDb().Update(
constant.FRIEND_DB, constant.FRIEND_DB,