Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into liwei
This commit is contained in:
commit
d1ae2a1878
@ -15,14 +15,14 @@ var (
|
||||
mainType: string(comm.ModuleFriend),
|
||||
subType: friend.FriendSubTypeList,
|
||||
req: &pb.FriendListReq{},
|
||||
rsp: &pb.FriendListRsp{},
|
||||
enabled: true,
|
||||
rsp: &pb.FriendListResp{},
|
||||
// enabled: true,
|
||||
}, {
|
||||
//blacklist
|
||||
mainType: string(comm.ModuleFriend),
|
||||
subType: friend.FriendSubTypeBlacklist,
|
||||
req: &pb.FriendBlackListReq{},
|
||||
rsp: &pb.FriendBlackListRsp{},
|
||||
rsp: &pb.FriendBlackListResp{},
|
||||
}, {
|
||||
//search
|
||||
mainType: string(comm.ModuleFriend),
|
||||
@ -30,33 +30,33 @@ var (
|
||||
req: &pb.FriendSearchReq{
|
||||
NickName: "", //设置测试参数
|
||||
},
|
||||
rsp: &pb.FriendSearchRsp{},
|
||||
enabled: true,
|
||||
rsp: &pb.FriendSearchResp{},
|
||||
// enabled: true,
|
||||
}, {
|
||||
//apply
|
||||
mainType: string(comm.ModuleFriend),
|
||||
subType: friend.FriendSubTypeApply,
|
||||
req: &pb.FriendApplyReq{},
|
||||
rsp: &pb.FriendApplyRsp{},
|
||||
rsp: &pb.FriendApplyResp{},
|
||||
// enabled: true,
|
||||
}, {
|
||||
//applylist
|
||||
mainType: string(comm.ModuleFriend),
|
||||
subType: friend.FriendSubTypeApplyList,
|
||||
req: &pb.FriendApplyListReq{},
|
||||
rsp: &pb.FriendApplyListRsp{},
|
||||
rsp: &pb.FriendApplyListResp{},
|
||||
}, {
|
||||
//agree
|
||||
mainType: string(comm.ModuleFriend),
|
||||
subType: friend.FriendSubTypeAgree,
|
||||
req: &pb.FriendAgreeReq{},
|
||||
rsp: &pb.FriendAgreeRsp{},
|
||||
rsp: &pb.FriendAgreeResp{},
|
||||
}, {
|
||||
//refuse
|
||||
mainType: string(comm.ModuleFriend),
|
||||
subType: friend.FriendSubTypeRefuse,
|
||||
req: &pb.FriendAgreeReq{},
|
||||
rsp: &pb.FriendAgreeRsp{},
|
||||
rsp: &pb.FriendAgreeResp{},
|
||||
}, {
|
||||
//addblack
|
||||
mainType: string(comm.ModuleFriend),
|
||||
@ -64,14 +64,14 @@ var (
|
||||
req: &pb.FriendBlackAddReq{
|
||||
FriendId: "0_62be9f40f67327fb53039b70",
|
||||
},
|
||||
rsp: &pb.FriendBlackAddRsp{},
|
||||
rsp: &pb.FriendBlackAddResp{},
|
||||
// enabled: true,
|
||||
}, {
|
||||
//delblack
|
||||
mainType: string(comm.ModuleFriend),
|
||||
subType: friend.FriendSubTypeDelBlack,
|
||||
req: &pb.FriendDelBlackReq{},
|
||||
rsp: &pb.FriendDelBlackRsp{},
|
||||
rsp: &pb.FriendDelBlackResp{},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
@ -24,7 +24,7 @@ var (
|
||||
fmt.Printf("%d- %v\n", (i + 1), v)
|
||||
}
|
||||
},
|
||||
// enabled: true,
|
||||
enabled: true,
|
||||
}, {
|
||||
mainType: string(comm.ModuleHero),
|
||||
subType: hero.HeroSubTypeInfo,
|
||||
|
@ -27,7 +27,7 @@ var user_builders = []*TestCase{
|
||||
Count: 100,
|
||||
},
|
||||
rsp: &pb.UserAddResResp{},
|
||||
enabled: true,
|
||||
// enabled: true,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -21,15 +21,15 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendBlackAddR
|
||||
err error
|
||||
self *pb.DBFriend
|
||||
target *pb.DBFriend
|
||||
rsp *pb.FriendBlackAddRsp
|
||||
Resp *pb.FriendBlackAddResp
|
||||
)
|
||||
|
||||
defer func() {
|
||||
rsp = &pb.FriendBlackAddRsp{
|
||||
Resp = &pb.FriendBlackAddResp{
|
||||
FriendId: req.FriendId,
|
||||
UserId: session.GetUserId(),
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), FriendSubTypeAddBlack, rsp)
|
||||
session.SendMsg(string(this.module.GetType()), FriendSubTypeAddBlack, Resp)
|
||||
}()
|
||||
|
||||
self = this.module.modelFriend.GetFriend(session.GetUserId())
|
||||
|
@ -22,15 +22,15 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (c
|
||||
err error
|
||||
self *pb.DBFriend
|
||||
target *pb.DBFriend
|
||||
rsp *pb.FriendAgreeRsp
|
||||
Resp *pb.FriendAgreeResp
|
||||
optNum int32
|
||||
)
|
||||
|
||||
defer func() {
|
||||
rsp = &pb.FriendAgreeRsp{
|
||||
Resp = &pb.FriendAgreeResp{
|
||||
Num: optNum,
|
||||
}
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, rsp)
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
|
@ -22,21 +22,21 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.FriendApplyReq) (c
|
||||
err error
|
||||
self *pb.DBFriend
|
||||
target *pb.DBFriend
|
||||
rsp *pb.FriendApplyRsp
|
||||
Resp *pb.FriendApplyResp
|
||||
)
|
||||
|
||||
defer func() {
|
||||
utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), FriendSubTypeApply, req, rsp)
|
||||
utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), FriendSubTypeApply, req, Resp)
|
||||
}()
|
||||
|
||||
defer func() {
|
||||
if code == pb.ErrorCode_Success {
|
||||
rsp = &pb.FriendApplyRsp{
|
||||
Resp = &pb.FriendApplyResp{
|
||||
UserId: session.GetUserId(),
|
||||
FriendId: req.FriendId,
|
||||
}
|
||||
}
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApply, rsp)
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApply, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
|
@ -15,17 +15,17 @@ func (this *apiComp) ApplyList(session comm.IUserSession, req *pb.FriendApplyLis
|
||||
var (
|
||||
err error
|
||||
self *pb.DBFriend
|
||||
rsp *pb.FriendApplyListRsp
|
||||
Resp *pb.FriendApplyListResp
|
||||
list []*pb.FriendBase
|
||||
)
|
||||
|
||||
defer func() {
|
||||
if code == pb.ErrorCode_Success {
|
||||
rsp = &pb.FriendApplyListRsp{
|
||||
Resp = &pb.FriendApplyListResp{
|
||||
List: list,
|
||||
}
|
||||
}
|
||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApplyList, rsp); err != nil {
|
||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApplyList, Resp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
}()
|
||||
|
@ -16,16 +16,16 @@ func (this *apiComp) Blacklist(session comm.IUserSession, req *pb.FriendBlackLis
|
||||
var (
|
||||
err error
|
||||
self *pb.DBFriend
|
||||
rsp *pb.FriendBlackListRsp
|
||||
Resp *pb.FriendBlackListResp
|
||||
list []*pb.FriendBase
|
||||
)
|
||||
|
||||
defer func() {
|
||||
rsp = &pb.FriendBlackListRsp{
|
||||
Resp = &pb.FriendBlackListResp{
|
||||
Friends: list,
|
||||
}
|
||||
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeBlacklist, rsp)
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeBlacklist, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
|
@ -20,16 +20,16 @@ func (this *apiComp) Delblack(session comm.IUserSession, req *pb.FriendDelBlackR
|
||||
var (
|
||||
err error
|
||||
self *pb.DBFriend
|
||||
rsp *pb.FriendDelBlackRsp
|
||||
Resp *pb.FriendDelBlackResp
|
||||
)
|
||||
defer func() {
|
||||
if code == pb.ErrorCode_Success {
|
||||
rsp = &pb.FriendDelBlackRsp{
|
||||
Resp = &pb.FriendDelBlackResp{
|
||||
FriendId: req.FriendId,
|
||||
UserId: session.GetUserId(),
|
||||
}
|
||||
}
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeDelBlack, rsp)
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeDelBlack, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
|
@ -15,15 +15,15 @@ func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.FriendListReq)
|
||||
func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
self *pb.DBFriend
|
||||
rsp *pb.FriendListRsp
|
||||
Resp *pb.FriendListResp
|
||||
list []*pb.FriendBase
|
||||
)
|
||||
|
||||
defer func() {
|
||||
rsp = &pb.FriendListRsp{
|
||||
Resp = &pb.FriendListResp{
|
||||
List: list,
|
||||
}
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeList, rsp)
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeList, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
|
@ -22,15 +22,15 @@ func (this *apiComp) Refuse(session comm.IUserSession, req *pb.FriendRefuseReq)
|
||||
var (
|
||||
err error
|
||||
self *pb.DBFriend
|
||||
rsp *pb.FriendRefuseRsp
|
||||
Resp *pb.FriendRefuseResp
|
||||
optNum int32
|
||||
)
|
||||
defer func() {
|
||||
rsp = &pb.FriendRefuseRsp{
|
||||
Resp = &pb.FriendRefuseResp{
|
||||
Num: optNum,
|
||||
}
|
||||
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeRefuse, rsp)
|
||||
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeRefuse, Resp)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
return
|
||||
|
@ -18,16 +18,16 @@ func (this *apiComp) SearchCheck(session comm.IUserSession, req *pb.FriendSearch
|
||||
//搜索
|
||||
func (this *apiComp) Search(session comm.IUserSession, req *pb.FriendSearchReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
rsp *pb.FriendSearchRsp
|
||||
Resp *pb.FriendSearchResp
|
||||
friend *pb.FriendBase
|
||||
)
|
||||
defer func() {
|
||||
if code == pb.ErrorCode_Success {
|
||||
rsp = &pb.FriendSearchRsp{
|
||||
Resp = &pb.FriendSearchResp{
|
||||
Friend: friend,
|
||||
}
|
||||
}
|
||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeSearch, rsp); err != nil {
|
||||
if err := session.SendMsg(string(this.module.GetType()), FriendSubTypeSearch, Resp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
}()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -99,7 +99,7 @@ type DBHero struct {
|
||||
EquipID []string `protobuf:"bytes,17,rep,name=equipID,proto3" json:"equipID" bson:"equipID"` //装备 objID
|
||||
ResonateNum int32 `protobuf:"varint,18,opt,name=resonateNum,proto3" json:"resonateNum" bson:"resonateNum"` //共鸣次数
|
||||
DistributionResonate int32 `protobuf:"varint,19,opt,name=distributionResonate,proto3" json:"distributionResonate" bson:"distributionResonate"` //分配的共鸣能量
|
||||
Energy map[int32]int32 `protobuf:"bytes,20,rep,name=energy,proto3" json:"energy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里
|
||||
Energy map[int32]int32 `protobuf:"bytes,20,rep,name=energy,proto3" json:"energy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // @go_tags(`bson:"energy"`)能量分配到哪里[1,0]
|
||||
SameCount int32 `protobuf:"varint,21,opt,name=sameCount,proto3" json:"sameCount" bson:"sameCount"` // 卡片叠加数量
|
||||
SuiteId int32 `protobuf:"varint,22,opt,name=suiteId,proto3" json:"suiteId" bson:"suiteId"` // 套装Id
|
||||
SuiteExtId int32 `protobuf:"varint,23,opt,name=suiteExtId,proto3" json:"suiteExtId"` // go_tags(`bson:"suiteExtId"`) 扩展套装Id
|
||||
|
@ -14,13 +14,13 @@ message FriendBase {
|
||||
//好友列表
|
||||
message FriendListReq {}
|
||||
|
||||
message FriendListRsp { repeated FriendBase list = 1; }
|
||||
message FriendListResp { repeated FriendBase list = 1; }
|
||||
|
||||
//申请好友
|
||||
message FriendApplyReq {
|
||||
string friendId = 1; //好友ID
|
||||
}
|
||||
message FriendApplyRsp {
|
||||
message FriendApplyResp {
|
||||
string userId = 1; //用户ID
|
||||
string friendId = 2; //好友ID
|
||||
}
|
||||
@ -30,7 +30,7 @@ message FriendDelReq {
|
||||
string friendId = 1; //好友ID
|
||||
}
|
||||
|
||||
message FriendDelRsp {
|
||||
message FriendDelResp {
|
||||
string friendId = 1; //好友ID
|
||||
string userId = 2; //用户ID
|
||||
}
|
||||
@ -39,7 +39,7 @@ message FriendDelRsp {
|
||||
message FriendAgreeReq {
|
||||
repeated string friendIds = 1; //被同意的用户
|
||||
}
|
||||
message FriendAgreeRsp {
|
||||
message FriendAgreeResp {
|
||||
int32 Num = 1; //操作的数量
|
||||
}
|
||||
|
||||
@ -47,30 +47,30 @@ message FriendAgreeRsp {
|
||||
message FriendRefuseReq {
|
||||
repeated string friendIds = 1; //被拒绝的用户
|
||||
}
|
||||
message FriendRefuseRsp {
|
||||
message FriendRefuseResp {
|
||||
int32 Num = 1; //操作的数量
|
||||
}
|
||||
|
||||
//好友申请列表
|
||||
message FriendApplyListReq {}
|
||||
message FriendApplyListRsp { repeated FriendBase list = 1; }
|
||||
message FriendApplyListResp { repeated FriendBase list = 1; }
|
||||
|
||||
//好友搜索
|
||||
message FriendSearchReq {
|
||||
string nickName = 1; //好友昵称
|
||||
}
|
||||
|
||||
message FriendSearchRsp { FriendBase friend = 1; }
|
||||
message FriendSearchResp { FriendBase friend = 1; }
|
||||
|
||||
//黑名单
|
||||
message FriendBlackListReq {}
|
||||
|
||||
message FriendBlackListRsp { repeated FriendBase friends = 1; }
|
||||
message FriendBlackListResp { repeated FriendBase friends = 1; }
|
||||
|
||||
//添加黑名单
|
||||
message FriendBlackAddReq { string friendId = 1; }
|
||||
|
||||
message FriendBlackAddRsp {
|
||||
message FriendBlackAddResp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
@ -78,7 +78,7 @@ message FriendBlackAddRsp {
|
||||
//删除黑名单
|
||||
message FriendDelBlackReq { string friendId = 1; }
|
||||
|
||||
message FriendDelBlackRsp {
|
||||
message FriendDelBlackResp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
@ -86,7 +86,7 @@ message FriendDelBlackRsp {
|
||||
//接收
|
||||
message FriendReceiveReq { string friendId = 1; }
|
||||
|
||||
message FriendReceiveRsp {
|
||||
message FriendReceiveResp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
@ -94,7 +94,7 @@ message FriendReceiveRsp {
|
||||
//赠送
|
||||
message FriendGiveReq { string friendId = 1; }
|
||||
|
||||
message FriendGiveRsp {
|
||||
message FriendGiveResp {
|
||||
string friendId = 1;
|
||||
string userId = 2;
|
||||
}
|
||||
@ -102,7 +102,7 @@ message FriendGiveRsp {
|
||||
//好友数量
|
||||
message FriendTotalReq { string friendId = 1; }
|
||||
|
||||
message FriendTotalRsp {
|
||||
message FriendTotalResp {
|
||||
string friendId = 1;
|
||||
int32 total = 2; //好友数量
|
||||
}
|
Loading…
Reference in New Issue
Block a user