pb重命名

This commit is contained in:
zhaocy 2022-06-28 17:50:09 +08:00
parent 1d602288dd
commit 55c6844301
21 changed files with 639 additions and 629 deletions

View File

@ -8,73 +8,73 @@ import (
var (
//friend
friend_builders = []*builder{
friendBuilders = []*builder{
{
//list
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_List,
req: &pb.Friend_List_Req{},
rsp: &pb.Friend_List_Rsp{},
subType: friend.FriendSubTypeList,
req: &pb.FriendListReq{},
rsp: &pb.FriendListRsp{},
enabled: true,
}, {
//blacklist
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_Blacklist,
req: &pb.Friend_BlackList_Req{},
rsp: &pb.Friend_BlackList_Rsp{},
subType: friend.FriendSubTypeBlacklist,
req: &pb.FriendBlackListReq{},
rsp: &pb.FriendBlackListRsp{},
}, {
//search
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_Search,
req: &pb.Friend_Search_Req{
subType: friend.FriendSubTypeSearch,
req: &pb.FriendSearchReq{
NickName: "", //设置测试参数
},
rsp: &pb.Friend_Search_Rsp{},
rsp: &pb.FriendSearchRsp{},
}, {
//apply
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_Apply,
req: &pb.Friend_Apply_Req{},
rsp: &pb.Friend_Apply_Rsp{},
subType: friend.FriendSubTypeApply,
req: &pb.FriendApplyReq{},
rsp: &pb.FriendApplyRsp{},
enabled: true,
}, {
//applylist
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_ApplyList,
req: &pb.Friend_ApplyList_Req{},
rsp: &pb.Friend_ApplyList_Rsp{},
subType: friend.FriendSubTypeApplyList,
req: &pb.FriendApplyListReq{},
rsp: &pb.FriendApplyListRsp{},
}, {
//agree
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_Agree,
req: &pb.Friend_Agree_Req{},
rsp: &pb.Friend_Agree_Rsp{},
subType: friend.FriendSubTypeAgree,
req: &pb.FriendAgreeReq{},
rsp: &pb.FriendAgreeRsp{},
}, {
//refuse
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_Refuse,
req: &pb.Friend_Agree_Req{},
rsp: &pb.Friend_Agree_Rsp{},
subType: friend.FriendSubTypeRefuse,
req: &pb.FriendAgreeReq{},
rsp: &pb.FriendAgreeRsp{},
}, {
//addblack
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_AddBlack,
req: &pb.Friend_BlackAdd_Req{
subType: friend.FriendSubTypeAddBlack,
req: &pb.FriendBlackAddReq{
FriendId: "",
},
rsp: &pb.Friend_BlackAdd_Rsp{},
rsp: &pb.FriendBlackAddRsp{},
}, {
//delblack
mainType: string(comm.SM_FriendModule),
subType: friend.Friend_SubType_DelBlack,
req: &pb.Friend_DelBlack_Req{},
rsp: &pb.Friend_DelBlack_Rsp{},
subType: friend.FriendSubTypeDelBlack,
req: &pb.FriendDelBlackReq{},
rsp: &pb.FriendDelBlackRsp{},
},
}
)
//声明加入到构建器并发起请求
func (r *Robot) RunFriend() {
r.addBuilders(friend_builders)
r.addBuilders(friendBuilders)
r.handleReq()
}

View File

@ -8,19 +8,21 @@ import (
var (
//hero
hero_builders = []*builder{
heroBuilders = []*builder{
{
mainType: string(comm.SM_HeroModule),
subType: hero.Hero_SubType_List,
subType: hero.HeroSubTypeList,
req: &pb.Hero_List_Req{},
rsp: &pb.Hero_List_Rsp{},
enabled: true,
}, {
mainType: string(comm.SM_HeroModule),
},
}
)
//声明加入到构建器并发起请求
func (r *Robot) RunHero() {
r.addBuilders(hero_builders)
r.addBuilders(heroBuilders)
r.handleReq()
}

View File

@ -6,15 +6,15 @@ import (
)
const (
Friend_SubType_List = "list"
Friend_SubType_Apply = "apply"
Friend_SubType_ApplyList = "applylist"
Friend_SubType_AddBlack = "addblack"
Friend_SubType_DelBlack = "delblack"
Friend_SubType_Blacklist = "blacklist"
Friend_SubType_Agree = "agree"
Friend_SubType_Refuse = "refuse"
Friend_SubType_Search = "search"
FriendSubTypeList = "list"
FriendSubTypeApply = "apply"
FriendSubTypeApplyList = "applylist"
FriendSubTypeAddBlack = "addblack"
FriendSubTypeDelBlack = "delblack"
FriendSubTypeBlacklist = "blacklist"
FriendSubTypeAgree = "agree"
FriendSubTypeRefuse = "refuse"
FriendSubTypeSearch = "search"
)
type apiComp struct {

View File

@ -6,14 +6,14 @@ import (
"go_dreamfactory/utils"
)
func (this *apiComp) AddblackCheck(session comm.IUserSession, req *pb.Friend_BlackAdd_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) AddblackCheck(session comm.IUserSession, req *pb.FriendBlackAddReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
var (
err error
blackNumMax = 50 //TODO 从配置中读取
)
self := &pb.DB_FriendData{UId: session.GetUserId()}
target := &pb.DB_FriendData{UId: req.FriendId}
self := &pb.DBFriend{UId: session.GetUserId()}
target := &pb.DBFriend{UId: req.FriendId}
err = this.module.modelFriend.Get(session.GetUserId(), self)
if self == nil || err != nil {
@ -58,22 +58,22 @@ func (this *apiComp) AddblackCheck(session comm.IUserSession, req *pb.Friend_Bla
}
//加入黑名单
func (this *apiComp) Addblack(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_BlackAdd_Req) (code pb.ErrorCode) {
func (this *apiComp) Addblack(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendBlackAddReq) (code pb.ErrorCode) {
var (
self *pb.DB_FriendData
rsp *pb.Friend_BlackAdd_Rsp
self *pb.DBFriend
rsp *pb.FriendBlackAddRsp
)
defer func() {
rsp = &pb.Friend_BlackAdd_Rsp{
rsp = &pb.FriendBlackAddRsp{
FriendId: req.FriendId,
UserId: session.GetUserId(),
}
session.SendMsg(string(this.module.GetType()), Friend_SubType_AddBlack, rsp)
session.SendMsg(string(this.module.GetType()), FriendSubTypeAddBlack, rsp)
}()
if v, ok := chk["self"]; ok {
self = v.(*pb.DB_FriendData)
self = v.(*pb.DBFriend)
//将目标加入黑名单
self.BlackIds = append(self.BlackIds, req.FriendId)

View File

@ -6,10 +6,10 @@ import (
"go_dreamfactory/utils"
)
func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.Friend_Agree_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.FriendAgreeReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
var err error
self := &pb.DB_FriendData{UId: session.GetUserId()}
self := &pb.DBFriend{UId: session.GetUserId()}
//获取玩家自己好友数据
err = this.module.modelFriend.Get(session.GetUserId(), self)
@ -34,18 +34,18 @@ func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.Friend_Agree_
}
//单个/批量同意
func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Agree_Req) (code pb.ErrorCode) {
func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendAgreeReq) (code pb.ErrorCode) {
var (
self *pb.DB_FriendData
rsp *pb.Friend_Agree_Rsp
self *pb.DBFriend
rsp *pb.FriendAgreeRsp
optNum int32
)
defer func() {
rsp = &pb.Friend_Agree_Rsp{
rsp = &pb.FriendAgreeRsp{
Num: optNum,
}
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Agree, rsp)
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
return
@ -56,7 +56,7 @@ func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}
code = pb.ErrorCode_FriendTargetNoData
return
} else {
self = v.(*pb.DB_FriendData)
self = v.(*pb.DBFriend)
}
if agreeIds, ok := chk["agreeIds"]; ok {
@ -70,7 +70,7 @@ func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}
}
//双向添加:将自己加入到申请人的好友列表中
target := &pb.DB_FriendData{}
target := &pb.DBFriend{}
err := this.module.modelFriend.Get(userId, target)
if target == nil || err != nil {
code = pb.ErrorCode_FriendTargetNoData

View File

@ -7,11 +7,11 @@ import (
"go_dreamfactory/utils"
)
func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.Friend_Apply_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.FriendApplyReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
var err error
self := &pb.DB_FriendData{UId: session.GetUserId()}
target := &pb.DB_FriendData{UId: req.FriendId}
self := &pb.DBFriend{UId: session.GetUserId()}
target := &pb.DBFriend{UId: req.FriendId}
//获取玩家自己好友数据
err = this.module.modelFriend.Get(session.GetUserId(), self)
@ -79,24 +79,24 @@ func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.Friend_Apply_
}
//好友申请
func (this *apiComp) Apply(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Apply_Req) (code pb.ErrorCode) {
func (this *apiComp) Apply(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendApplyReq) (code pb.ErrorCode) {
var (
target *pb.DB_FriendData
rsp *pb.Friend_Apply_Rsp
target *pb.DBFriend
rsp *pb.FriendApplyRsp
)
defer func() {
utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), Friend_SubType_Apply, req, rsp)
utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), FriendSubTypeApply, req, rsp)
}()
defer func() {
if code == pb.ErrorCode_Success {
rsp = &pb.Friend_Apply_Rsp{
rsp = &pb.FriendApplyRsp{
UserId: session.GetUserId(),
FriendId: req.FriendId,
}
}
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Apply, rsp)
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApply, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
return
@ -107,7 +107,7 @@ func (this *apiComp) Apply(session comm.IUserSession, chk map[string]interface{}
code = pb.ErrorCode_FriendTargetNoData
return
} else {
target = v.(*pb.DB_FriendData)
target = v.(*pb.DBFriend)
}
//将自己加入到目标用户的申请列表中

View File

@ -5,9 +5,9 @@ import (
"go_dreamfactory/pb"
)
func (this *apiComp) ApplyListCheck(session comm.IUserSession, req *pb.Friend_ApplyList_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) ApplyListCheck(session comm.IUserSession, req *pb.FriendApplyListReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
self := &pb.DB_FriendData{UId: session.GetUserId()}
self := &pb.DBFriend{UId: session.GetUserId()}
err := this.module.modelFriend.Get(session.GetUserId(), self)
if self == nil || err != nil {
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
@ -18,24 +18,24 @@ func (this *apiComp) ApplyListCheck(session comm.IUserSession, req *pb.Friend_Ap
}
//申请列表
func (this *apiComp) ApplyList(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_ApplyList_Req) (code pb.ErrorCode) {
func (this *apiComp) ApplyList(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendApplyListReq) (code pb.ErrorCode) {
var (
self *pb.DB_FriendData
rsp *pb.Friend_ApplyList_Rsp
self *pb.DBFriend
rsp *pb.FriendApplyListRsp
list []*pb.FriendBase
)
defer func() {
if code == pb.ErrorCode_Success {
rsp = &pb.Friend_ApplyList_Rsp{
rsp = &pb.FriendApplyListRsp{
List: list,
}
}
session.SendMsg(string(this.module.GetType()), Friend_SubType_ApplyList, rsp)
session.SendMsg(string(this.module.GetType()), FriendSubTypeApplyList, rsp)
}()
if v, ok := chk["self"]; ok {
self = v.(*pb.DB_FriendData)
self = v.(*pb.DBFriend)
for _, userId := range self.ApplyIds {
//TODO 组装FriendBase明细数据
list = append(list, &pb.FriendBase{

View File

@ -5,9 +5,9 @@ import (
"go_dreamfactory/pb"
)
func (this *apiComp) BlacklistCheck(session comm.IUserSession, req *pb.Friend_BlackList_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) BlacklistCheck(session comm.IUserSession, req *pb.FriendBlackListReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
self := &pb.DB_FriendData{UId: session.GetUserId()}
self := &pb.DBFriend{UId: session.GetUserId()}
err := this.module.modelFriend.Get(session.GetUserId(), self)
if self == nil || err != nil {
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
@ -18,19 +18,19 @@ func (this *apiComp) BlacklistCheck(session comm.IUserSession, req *pb.Friend_Bl
}
//黑名单
func (this *apiComp) Blacklist(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_BlackList_Req) (code pb.ErrorCode) {
func (this *apiComp) Blacklist(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendBlackListReq) (code pb.ErrorCode) {
var (
self *pb.DB_FriendData
rsp *pb.Friend_BlackList_Rsp
self *pb.DBFriend
rsp *pb.FriendBlackListRsp
list []*pb.FriendBase
)
defer func() {
rsp = &pb.Friend_BlackList_Rsp{
rsp = &pb.FriendBlackListRsp{
Friends: list,
}
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Blacklist, rsp)
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeBlacklist, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
return
@ -38,7 +38,7 @@ func (this *apiComp) Blacklist(session comm.IUserSession, chk map[string]interfa
}()
if v, ok := chk["self"]; ok {
self = v.(*pb.DB_FriendData)
self = v.(*pb.DBFriend)
for _, userId := range self.BlackIds {
//TODO 完善FriendBase信息
list = append(list, &pb.FriendBase{

View File

@ -5,11 +5,11 @@ import (
"go_dreamfactory/pb"
)
func (this *apiComp) DelCheck(session comm.IUserSession, req *pb.Friend_Del_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) DelCheck(session comm.IUserSession, req *pb.FriendDelReq) (chk map[string]interface{}, code comm.ErrorCode) {
return
}
//删除好友
func (this *apiComp) Del(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Del_Req) error {
func (this *apiComp) Del(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendDelReq) error {
return nil
}

View File

@ -6,9 +6,9 @@ import (
"go_dreamfactory/utils"
)
func (this *apiComp) DelblackCheck(session comm.IUserSession, req *pb.Friend_DelBlack_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) DelblackCheck(session comm.IUserSession, req *pb.FriendDelBlackReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
self := &pb.DB_FriendData{UId: session.GetUserId()}
self := &pb.DBFriend{UId: session.GetUserId()}
err := this.module.modelFriend.Get(session.GetUserId(), self)
if self == nil || err != nil {
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
@ -19,19 +19,19 @@ func (this *apiComp) DelblackCheck(session comm.IUserSession, req *pb.Friend_Del
}
//删除黑名单
func (this *apiComp) Delblack(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_DelBlack_Req) (code pb.ErrorCode) {
func (this *apiComp) Delblack(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendDelBlackReq) (code pb.ErrorCode) {
var (
self *pb.DB_FriendData
rsp *pb.Friend_DelBlack_Rsp
self *pb.DBFriend
rsp *pb.FriendDelBlackRsp
)
defer func() {
if code == pb.ErrorCode_Success {
rsp = &pb.Friend_DelBlack_Rsp{
rsp = &pb.FriendDelBlackRsp{
FriendId: req.FriendId,
UserId: session.GetUserId(),
}
}
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_DelBlack, rsp)
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeDelBlack, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
return
@ -39,7 +39,7 @@ func (this *apiComp) Delblack(session comm.IUserSession, chk map[string]interfac
}()
if v, ok := chk["self"]; ok {
self = v.(*pb.DB_FriendData)
self = v.(*pb.DBFriend)
//从黑名单列表中删除目标
self.BlackIds = utils.DeleteString(self.BlackIds, req.FriendId)
//更新黑名单

View File

@ -5,9 +5,9 @@ import (
"go_dreamfactory/pb"
)
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.Friend_List_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.FriendListReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
self := &pb.DB_FriendData{UId: session.GetUserId()}
self := &pb.DBFriend{UId: session.GetUserId()}
err := this.module.modelFriend.Get(session.GetUserId(), self)
if self == nil || err != nil {
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
@ -18,18 +18,18 @@ func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.Friend_List_Re
}
//好友列表
func (this *apiComp) List(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_List_Req) (code pb.ErrorCode) {
func (this *apiComp) List(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendListReq) (code pb.ErrorCode) {
var (
self *pb.DB_FriendData
rsp *pb.Friend_List_Rsp
self *pb.DBFriend
rsp *pb.FriendListRsp
list []*pb.FriendBase
)
defer func() {
rsp = &pb.Friend_List_Rsp{
rsp = &pb.FriendListRsp{
List: list,
}
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_List, rsp)
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeList, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
return
@ -37,7 +37,7 @@ func (this *apiComp) List(session comm.IUserSession, chk map[string]interface{},
}()
if v, ok := chk["self"]; ok {
self = v.(*pb.DB_FriendData)
self = v.(*pb.DBFriend)
for _, userId := range self.FriendIds {
list = append(list, &pb.FriendBase{
UserId: userId,

View File

@ -6,10 +6,10 @@ import (
"go_dreamfactory/utils"
)
func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.Friend_Refuse_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.FriendRefuseReq) (chk map[string]interface{}, code comm.ErrorCode) {
chk = make(map[string]interface{})
var err error
self := &pb.DB_FriendData{UId: session.GetUserId()}
self := &pb.DBFriend{UId: session.GetUserId()}
//获取玩家自己好友数据
err = this.module.modelFriend.Get(session.GetUserId(), self)
@ -33,19 +33,19 @@ func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.Friend_Refus
}
//单个/批量拒绝
func (this *apiComp) Refuse(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Refuse_Req) (code pb.ErrorCode) {
func (this *apiComp) Refuse(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendRefuseReq) (code pb.ErrorCode) {
//将申请人从申请列表中删除
var (
self *pb.DB_FriendData
rsp *pb.Friend_Refuse_Rsp
self *pb.DBFriend
rsp *pb.FriendRefuseRsp
optNum int32
)
defer func() {
rsp = &pb.Friend_Refuse_Rsp{
rsp = &pb.FriendRefuseRsp{
Num: optNum,
}
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Refuse, rsp)
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeRefuse, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
return
@ -56,7 +56,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, chk map[string]interface{
code = pb.ErrorCode_FriendTargetNoData
return
} else {
self = v.(*pb.DB_FriendData)
self = v.(*pb.DBFriend)
if v, ok := chk["refuseIds"]; ok {
//将申请人从申请列表中删除

View File

@ -5,7 +5,7 @@ import (
"go_dreamfactory/pb"
)
func (this *apiComp) SearchCheck(session comm.IUserSession, req *pb.Friend_Search_Req) (chk map[string]interface{}, code comm.ErrorCode) {
func (this *apiComp) SearchCheck(session comm.IUserSession, req *pb.FriendSearchReq) (chk map[string]interface{}, code comm.ErrorCode) {
if req.NickName == "" {
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSearchNameEmpty}
return
@ -14,18 +14,18 @@ func (this *apiComp) SearchCheck(session comm.IUserSession, req *pb.Friend_Searc
}
//搜索
func (this *apiComp) Search(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Search_Req) (code pb.ErrorCode) {
func (this *apiComp) Search(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendSearchReq) (code pb.ErrorCode) {
var (
rsp *pb.Friend_Search_Rsp
rsp *pb.FriendSearchRsp
friend *pb.FriendBase
)
defer func() {
if code == pb.ErrorCode_Success {
rsp = &pb.Friend_Search_Rsp{
rsp = &pb.FriendSearchRsp{
Friend: friend,
}
}
session.SendMsg(string(this.module.GetType()), Friend_SubType_Search, rsp)
session.SendMsg(string(this.module.GetType()), FriendSubTypeSearch, rsp)
}()
user := this.module.modelFriend.Frined_FindCond(req.NickName)

View File

@ -15,8 +15,8 @@ type apiComp struct {
const ( //消息回复的头名称
StrengthenUplv = "strengthenherolv"
Hero_SubType_Info = "info" //英雄卡片信息
Hero_SubType_List = "list" //英雄列表
HeroSubTypeInfo = "info" //英雄卡片信息
HeroSubTypeList = "list" //英雄列表
)
//组件初始化接口

View File

@ -19,7 +19,7 @@ func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.Hero_Info_Req)
func (this *apiComp) Info(session comm.IUserSession, result map[string]interface{}, req *pb.Hero_Info_Req) (code pb.ErrorCode) {
rsp := &pb.Hero_Info_Rsp{}
defer func() {
err := session.SendMsg(string(this.moduleHero.GetType()), Hero_SubType_Info, rsp)
err := session.SendMsg(string(this.moduleHero.GetType()), HeroSubTypeInfo, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
return

View File

@ -14,7 +14,7 @@ func (this *apiComp) List(session comm.IUserSession, result map[string]interface
rsp := &pb.Hero_List_Rsp{}
defer func() {
err := session.SendMsg(this.moduleHero.api.service.GetType(), Hero_SubType_List, rsp)
err := session.SendMsg(string(this.moduleHero.GetType()), HeroSubTypeList, rsp)
if err != nil {
code = pb.ErrorCode_SystemError
}

View File

@ -20,7 +20,7 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DB_FriendData struct {
type DBFriend struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@ -31,8 +31,8 @@ type DB_FriendData struct {
BlackIds []string `protobuf:"bytes,4,rep,name=blackIds,proto3" json:"blackIds" bson:"blackIds"` //黑名单ID
}
func (x *DB_FriendData) Reset() {
*x = DB_FriendData{}
func (x *DBFriend) Reset() {
*x = DBFriend{}
if protoimpl.UnsafeEnabled {
mi := &file_friend_friend_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -40,13 +40,13 @@ func (x *DB_FriendData) Reset() {
}
}
func (x *DB_FriendData) String() string {
func (x *DBFriend) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DB_FriendData) ProtoMessage() {}
func (*DBFriend) ProtoMessage() {}
func (x *DB_FriendData) ProtoReflect() protoreflect.Message {
func (x *DBFriend) ProtoReflect() protoreflect.Message {
mi := &file_friend_friend_db_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@ -58,33 +58,33 @@ func (x *DB_FriendData) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
// Deprecated: Use DB_FriendData.ProtoReflect.Descriptor instead.
func (*DB_FriendData) Descriptor() ([]byte, []int) {
// Deprecated: Use DBFriend.ProtoReflect.Descriptor instead.
func (*DBFriend) Descriptor() ([]byte, []int) {
return file_friend_friend_db_proto_rawDescGZIP(), []int{0}
}
func (x *DB_FriendData) GetUId() string {
func (x *DBFriend) GetUId() string {
if x != nil {
return x.UId
}
return ""
}
func (x *DB_FriendData) GetFriendIds() []string {
func (x *DBFriend) GetFriendIds() []string {
if x != nil {
return x.FriendIds
}
return nil
}
func (x *DB_FriendData) GetApplyIds() []string {
func (x *DBFriend) GetApplyIds() []string {
if x != nil {
return x.ApplyIds
}
return nil
}
func (x *DB_FriendData) GetBlackIds() []string {
func (x *DBFriend) GetBlackIds() []string {
if x != nil {
return x.BlackIds
}
@ -95,16 +95,15 @@ var File_friend_friend_db_proto protoreflect.FileDescriptor
var file_friend_friend_db_proto_rawDesc = []byte{
0x0a, 0x16, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x0d, 0x44, 0x42, 0x5f, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09,
0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70,
0x6c, 0x79, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70,
0x6c, 0x79, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64,
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64,
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x08, 0x44, 0x42, 0x46, 0x72,
0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64,
0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e,
0x64, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x73,
0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03,
0x28, 0x09, 0x52, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -121,7 +120,7 @@ func file_friend_friend_db_proto_rawDescGZIP() []byte {
var file_friend_friend_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_friend_friend_db_proto_goTypes = []interface{}{
(*DB_FriendData)(nil), // 0: DB_FriendData
(*DBFriend)(nil), // 0: DBFriend
}
var file_friend_friend_db_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@ -138,7 +137,7 @@ func file_friend_friend_db_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_friend_friend_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DB_FriendData); i {
switch v := v.(*DBFriend); i {
case 0:
return &v.state
case 1:

File diff suppressed because it is too large Load Diff

View File

@ -430,7 +430,8 @@ type Hero_StrengthenUpStar_Req struct {
unknownFields protoimpl.UnknownFields
HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID
Items []*CostCardData `protobuf:"bytes,2,rep,name=items,proto3" json:"items"` // 消耗卡牌对象ID
Hero []*CostCardData `protobuf:"bytes,2,rep,name=hero,proto3" json:"hero"` // 消耗卡牌对象ID
HeroRace []*CostCardData `protobuf:"bytes,3,rep,name=heroRace,proto3" json:"heroRace"` // 消耗种族卡牌对象ID
}
func (x *Hero_StrengthenUpStar_Req) Reset() {
@ -472,9 +473,16 @@ func (x *Hero_StrengthenUpStar_Req) GetHeroObjID() string {
return ""
}
func (x *Hero_StrengthenUpStar_Req) GetItems() []*CostCardData {
func (x *Hero_StrengthenUpStar_Req) GetHero() []*CostCardData {
if x != nil {
return x.Items
return x.Hero
}
return nil
}
func (x *Hero_StrengthenUpStar_Req) GetHeroRace() []*CostCardData {
if x != nil {
return x.HeroRace
}
return nil
}
@ -1111,74 +1119,77 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62,
0x6a, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x61, 0x0a, 0x19, 0x48, 0x65, 0x72,
0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74,
0x61, 0x72, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62,
0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f,
0x62, 0x6a, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20,
0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x19, 0x48, 0x65,
0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53,
0x74, 0x61, 0x72, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f,
0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f,
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72,
0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x41, 0x0a, 0x1a,
0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55,
0x70, 0x53, 0x74, 0x61, 0x72, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65,
0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42,
0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22,
0x82, 0x01, 0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74,
0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c,
0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a,
0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x0a, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x05,
0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62,
0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69,
0x74, 0x65, 0x6d, 0x73, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72,
0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52,
0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61,
0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f,
0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63,
0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x48, 0x65,
0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70,
0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x2c, 0x0a, 0x08, 0x68,
0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52,
0x08, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x22, 0x41, 0x0a, 0x1a, 0x48, 0x65, 0x72,
0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74,
0x61, 0x72, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65,
0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x82, 0x01, 0x0a,
0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e,
0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68,
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6b, 0x69,
0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73,
0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x74, 0x65,
0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f,
0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d,
0x73, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67,
0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x73, 0x70,
0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52,
0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x2f, 0x0a,
0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61,
0x74, 0x61, 0x52, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x22, 0x36,
0x0a, 0x16, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52,
0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f,
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72,
0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x56, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47,
0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x73,
0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61,
0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x72,
0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x55,
0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09,
0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73,
0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75,
0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54,
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79,
0x70, 0x65, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d,
0x69, 0x6e, 0x67, 0x55, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x73,
0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61,
0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x5c, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a,
0x75, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65,
0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f,
0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65,
0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68,
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74,
0x49, 0x74, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62,
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49,
0x74, 0x6d, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65,
0x78, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72,
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f,
0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74,
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x73,
0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x5f,
0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a,
0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62,
0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65,
0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x2f, 0x0a, 0x0a, 0x75, 0x70,
0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52,
0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x22, 0x36, 0x0a, 0x16, 0x48,
0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65,
0x74, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a,
0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62,
0x6a, 0x49, 0x44, 0x22, 0x56, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67,
0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23,
0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68,
0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x72, 0x0a, 0x1a, 0x48,
0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x55, 0x73, 0x65, 0x45,
0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72,
0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65,
0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e,
0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x45,
0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22,
0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67,
0x55, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23,
0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68,
0x65, 0x72, 0x6f, 0x22, 0x5c, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65, 0x78,
0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f,
0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f,
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x6d,
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74,
0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x6d, 0x65,
0x73, 0x22, 0x38, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65, 0x78, 0x69, 0x6e,
0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72,
0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1221,21 +1232,22 @@ var file_hero_hero_msg_proto_depIdxs = []int32{
20, // 0: pb.Hero_Info_Rsp.base:type_name -> pb.DB_HeroData
20, // 1: pb.Hero_List_Rsp.list:type_name -> pb.DB_HeroData
20, // 2: pb.Hero_StrengthenUplv_Resp.hero:type_name -> pb.DB_HeroData
7, // 3: pb.Hero_StrengthenUpStar_Req.items:type_name -> pb.CostCardData
20, // 4: pb.Hero_StrengthenUpStar_Resp.hero:type_name -> pb.DB_HeroData
7, // 5: pb.Hero_StrengthenUpSkill_Req.items:type_name -> pb.CostCardData
20, // 6: pb.Hero_StrengthenUpSkill_Resp.hero:type_name -> pb.DB_HeroData
20, // 7: pb.Hero_Gongming_Resp.hero:type_name -> pb.DB_HeroData
20, // 8: pb.Hero_Gongming_Resp.upStarCard:type_name -> pb.DB_HeroData
20, // 9: pb.Hero_GongmingReset_Resp.hero:type_name -> pb.DB_HeroData
20, // 10: pb.Hero_GongmingUseEnergy_Resp.hero:type_name -> pb.DB_HeroData
4, // 11: pb.Hero_Juexing_Req.costItmes:type_name -> pb.ItemData
20, // 12: pb.Hero_Juexing_Resp.hero:type_name -> pb.DB_HeroData
13, // [13:13] is the sub-list for method output_type
13, // [13:13] is the sub-list for method input_type
13, // [13:13] is the sub-list for extension type_name
13, // [13:13] is the sub-list for extension extendee
0, // [0:13] is the sub-list for field type_name
7, // 3: pb.Hero_StrengthenUpStar_Req.hero:type_name -> pb.CostCardData
7, // 4: pb.Hero_StrengthenUpStar_Req.heroRace:type_name -> pb.CostCardData
20, // 5: pb.Hero_StrengthenUpStar_Resp.hero:type_name -> pb.DB_HeroData
7, // 6: pb.Hero_StrengthenUpSkill_Req.items:type_name -> pb.CostCardData
20, // 7: pb.Hero_StrengthenUpSkill_Resp.hero:type_name -> pb.DB_HeroData
20, // 8: pb.Hero_Gongming_Resp.hero:type_name -> pb.DB_HeroData
20, // 9: pb.Hero_Gongming_Resp.upStarCard:type_name -> pb.DB_HeroData
20, // 10: pb.Hero_GongmingReset_Resp.hero:type_name -> pb.DB_HeroData
20, // 11: pb.Hero_GongmingUseEnergy_Resp.hero:type_name -> pb.DB_HeroData
4, // 12: pb.Hero_Juexing_Req.costItmes:type_name -> pb.ItemData
20, // 13: pb.Hero_Juexing_Resp.hero:type_name -> pb.DB_HeroData
14, // [14:14] is the sub-list for method output_type
14, // [14:14] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_hero_hero_msg_proto_init() }

View File

@ -1,7 +1,7 @@
syntax = "proto3";
option go_package = ".;pb";
message DB_FriendData {
message DBFriend {
string uId = 1; //@go_tags(`bson:"uId"`) ID
repeated string friendIds = 2; //@go_tags(`bson:"friendIds"`) ID
repeated string applyIds = 3; //@go_tags(`bson:"applyIds"`) ID

View File

@ -12,97 +12,97 @@ message FriendBase {
}
//
message Friend_List_Req {}
message FriendListReq {}
message Friend_List_Rsp { repeated FriendBase list = 1; }
message FriendListRsp { repeated FriendBase list = 1; }
//
message Friend_Apply_Req {
message FriendApplyReq {
string friendId = 1; //ID
}
message Friend_Apply_Rsp {
message FriendApplyRsp {
string userId = 1; //ID
string friendId = 2; //ID
}
//
message Friend_Del_Req {
message FriendDelReq {
string friendId = 1; //ID
}
message Friend_Del_Rsp {
message FriendDelRsp {
string friendId = 1; //ID
string userId = 2; //ID
}
//
message Friend_Agree_Req {
message FriendAgreeReq {
repeated string friendIds = 1; //
}
message Friend_Agree_Rsp {
message FriendAgreeRsp {
int32 Num = 1; //
}
//
message Friend_Refuse_Req {
message FriendRefuseReq {
repeated string friendIds = 1; //
}
message Friend_Refuse_Rsp {
message FriendRefuseRsp {
int32 Num = 1; //
}
//
message Friend_ApplyList_Req {}
message Friend_ApplyList_Rsp { repeated FriendBase list = 1; }
message FriendApplyListReq {}
message FriendApplyListRsp { repeated FriendBase list = 1; }
//
message Friend_Search_Req {
message FriendSearchReq {
string nickName = 1; //
}
message Friend_Search_Rsp { FriendBase friend = 1; }
message FriendSearchRsp { FriendBase friend = 1; }
//
message Friend_BlackList_Req {}
message FriendBlackListReq {}
message Friend_BlackList_Rsp { repeated FriendBase friends = 1; }
message FriendBlackListRsp { repeated FriendBase friends = 1; }
//
message Friend_BlackAdd_Req { string friendId = 1; }
message FriendBlackAddReq { string friendId = 1; }
message Friend_BlackAdd_Rsp {
message FriendBlackAddRsp {
string friendId = 1;
string userId = 2;
}
//
message Friend_DelBlack_Req { string friendId = 1; }
message FriendDelBlackReq { string friendId = 1; }
message Friend_DelBlack_Rsp {
message FriendDelBlackRsp {
string friendId = 1;
string userId = 2;
}
//
message Friend_Receive_Req { string friendId = 1; }
message FriendReceiveReq { string friendId = 1; }
message Friend_Receive_Rsp {
message FriendReceiveRsp {
string friendId = 1;
string userId = 2;
}
//
message Friend_Give_Req { string friendId = 1; }
message FriendGiveReq { string friendId = 1; }
message Friend_Give_Rsp {
message FriendGiveRsp {
string friendId = 1;
string userId = 2;
}
//
message Friend_Total_Req { string friendId = 1; }
message FriendTotalReq { string friendId = 1; }
message Friend_Total_Rsp {
message FriendTotalRsp {
string friendId = 1;
int32 total = 2; //
}