上传机器人处协议代码

This commit is contained in:
liwei1dao 2022-06-09 13:46:58 +08:00
parent 152a8d859e
commit b9672e0682
2 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ func (r *Robot) handlePackMsg(msg *pb.UserMessage) {
//添加好友 //添加好友
func (r *Robot) QueryUserPack() { func (r *Robot) QueryUserPack() {
req := &pb.QueryUserPackReq{IType: 1} req := &pb.GetlistReq{IType: 1}
head := &pb.UserMessage{MainType: "pack", SubType: "queryuserpackreq"} head := &pb.UserMessage{MainType: "pack", SubType: "queryuserpackreq"}
defer traceFunc(head.MainType, head.SubType, r.user.UserData.GetUserId(), req) defer traceFunc(head.MainType, head.SubType, r.user.UserData.GetUserId(), req)
err := r.SendToClient(head, req) err := r.SendToClient(head, req)
@ -25,7 +25,7 @@ func (r *Robot) QueryUserPack() {
} }
func (r *Robot) handleQueryUserPack(msg *pb.UserMessage) { func (r *Robot) handleQueryUserPack(msg *pb.UserMessage) {
rsp := &pb.QueryUserPackResp{} rsp := &pb.GetlistResp{}
if !comm.ProtoDecode(msg, rsp) { if !comm.ProtoDecode(msg, rsp) {
return return
} }

View File

@ -13,9 +13,9 @@ import (
type Option func(*Options) type Option func(*Options)
type Options struct { type Options struct {
ConfPath string ConfPath string //配置文件路径
Version string //服务版本 Version string //服务版本
Setting core.ServiceSttings Setting core.ServiceSttings //服务参数配置
} }
func SetConfPath(v string) Option { func SetConfPath(v string) Option {