diff --git a/modules/friend/api_cross_accept.go b/modules/friend/api_cross_accept.go index 4ef00eacf..5628a0393 100644 --- a/modules/friend/api_cross_accept.go +++ b/modules/friend/api_cross_accept.go @@ -28,8 +28,6 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.FriendAcceptReq) now := configure.Now().Unix() if now-qr.Timestamp > 10 { //大于10s 切磋超时 code = pb.ErrorCode_FriendQiecuoTimeout - //清除切磋记录 - // this.moduleFriend.ModelFriendQiecuo.Del(req.Uid) return } } else { diff --git a/modules/friend/module.go b/modules/friend/module.go index f16b2ab03..979f1301c 100644 --- a/modules/friend/module.go +++ b/modules/friend/module.go @@ -180,7 +180,12 @@ func (this *Friend) UseAssistHero(uid, friendId string) (*pb.DBHero, error) { func (this *Friend) QiecuoFinishNotify(redUid, matchId string) error { qr := this.ModelFriendQiecuo.getQiecuo(redUid) if qr != nil && qr.MatchId == matchId { - this.ModelFriendQiecuo.Del(redUid) + log.Debug("清理切磋记录", + log.Field{Key: "redUid", Value: redUid}, + log.Field{Key: "matchId", Value: matchId}) + if err := this.ModelFriendQiecuo.Del(redUid); err != nil { + log.Error("删除", log.Field{Key: "redUid", Value: redUid}) + } } return nil }