update
This commit is contained in:
parent
cd8ee73e90
commit
c9869d646c
@ -30,12 +30,6 @@ func (this *apiComp) Qiecuo(session comm.IUserSession, req *pb.FriendQiecuoReq)
|
||||
return
|
||||
}
|
||||
|
||||
//判断是否已发送切磋请求
|
||||
if qr == nil {
|
||||
code = pb.ErrorCode_FriendQiecuoNoRequest
|
||||
return
|
||||
}
|
||||
|
||||
//已发送切磋
|
||||
// if qr.Timestamp != 0 {
|
||||
// code = pb.ErrorCode_FriendQiecuoRequested
|
||||
|
@ -49,6 +49,14 @@ func (this *ModelFriendQiecuo) createQiecuoRecord(uid, targetUid string) (*pb.Qi
|
||||
this.moduleFriend.Errorln(err)
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
update := map[string]interface{}{
|
||||
"targetId": targetUid,
|
||||
"timestamp": configure.Now().Unix(),
|
||||
}
|
||||
if err := this.Change(uid, update); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return qr, nil
|
||||
|
Loading…
Reference in New Issue
Block a user