This commit is contained in:
aozhiwei 2024-04-11 20:49:10 +08:00
parent cef671daf1
commit d5f6cd31ed
2 changed files with 17 additions and 11 deletions

View File

@ -273,17 +273,7 @@ func (this *friendMgr) AsyncDeleteFriend(senderId string, targetId string, cb fu
return
}
accountId1, accountId2 := this.sortAccounts(senderId, targetId)
f5.GetJsStyleDb().Update(
constant.FRIEND_DB,
"t_friend_relationship",
[][]string{
{"deleted", q5.ToString(1)},
{"del_time", q5.ToString(f5.GetApp().GetNowSeconds())},
},
[][]string{
{"account_id1", accountId1},
{"account_id2", accountId2},
},
model.Friend.DeleteSoft(accountId1, accountId2,
func (err error, lastInsertId int64, rowsAffected int64) {
if err != nil {
cb(1, "")

View File

@ -35,3 +35,19 @@ func (this *friend) Force(accountId1 string, accountId2 string, nowTime int64,
},
cb)
}
func (this *friend) DeleteSoft(accountId1 string, accountId2 string,
cb func (error, int64, int64)) {
f5.GetJsStyleDb().Update(
constant.FRIEND_DB,
"t_friend_relationship",
[][]string{
{"deleted", q5.ToString(1)},
{"del_time", q5.ToString(f5.GetApp().GetNowSeconds())},
},
[][]string{
{"account_id1", accountId1},
{"account_id2", accountId2},
},
cb)
}