29 lines
736 B
Go
29 lines
736 B
Go
package friend
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
// 切磋终止
|
|
func (this *apiComp) StopCheck(session comm.IUserSession, req *pb.FriendStopReq) (errdata *pb.ErrorData) {
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) Stop(session comm.IUserSession, req *pb.FriendStopReq) (errdata *pb.ErrorData) {
|
|
if errdata = this.StopCheck(session, req); errdata != nil {
|
|
return
|
|
}
|
|
|
|
//清楚切磋请求记录
|
|
this.module.ModelFriendQiecuo.DelByUId(req.Uid)
|
|
|
|
resp := &pb.FriendStopResp{
|
|
IsSucc: true,
|
|
}
|
|
session.SendMsg(string(this.module.GetType()), "stop", resp)
|
|
this.module.SendMsgToUser(string(this.module.GetType()), "qiecuonotify",
|
|
&pb.FriendQiecuonotifyPush{Uid: session.GetUserId(), NotifyType: 3}, req.Uid)
|
|
return
|
|
}
|