Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
aa4ae0f05b
@ -54,112 +54,10 @@
|
||||
"describe": "查询英雄详细"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.apply",
|
||||
"msgid": "friend",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "好友申请"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.agree",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "同意"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.refuse",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "拒绝"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.list",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "好友列表"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.applylist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "好友申请列表"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.addblack",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "加黑名单"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.delblack",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "删除黑名单"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.blacklist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "黑名单列表"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.zan",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "好友点赞"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.zanreceive",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "接收点赞"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.zanlist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "点赞列表"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.assisthero",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "英雄助战"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.assistlist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "助战列表"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.getreward",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "获取奖励"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.del",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "删除好友"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.search",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "搜索好友"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.randlist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "好友推荐"
|
||||
},
|
||||
{
|
||||
"msgid": "friend.assistherolist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "好友助战英雄列表"
|
||||
"describe": "好友系统"
|
||||
},
|
||||
{
|
||||
"msgid": "gourmet.getranduser",
|
||||
@ -167,96 +65,6 @@
|
||||
"routrules": "~/worker",
|
||||
"describe": "获取在线玩家数据"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.list",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会列表"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.create",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "创建公会"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.setting",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会设置"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.search",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会搜索"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.apply",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会申请"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.applylist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会申请列表"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.agree",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会申请同意"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.refuse",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会申请拒绝"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.dismiss",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会解散"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.quit",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "离开公会"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.mine",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "我的公会"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.members",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会成员"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.assign",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会转让"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.discharge",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "踢出公会"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.settingjob",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "设置公会职位"
|
||||
},
|
||||
{
|
||||
"msgid": "smithy.getranduser",
|
||||
"open": true,
|
||||
@ -270,58 +78,10 @@
|
||||
"describe": "竞技场"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.sign",
|
||||
"msgid": "sociaty",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会签到"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.applycancel",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会申请撤销"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.receive",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会任务奖励领取"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.activityreceive",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会活跃度领取"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.rank",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会排行"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.tasklist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会任务列表"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.log",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会日志列表"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.accuse",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "弹劾"
|
||||
},
|
||||
{
|
||||
"msgid": "sociaty.activitylist",
|
||||
"open": true,
|
||||
"routrules": "~/worker",
|
||||
"describe": "公会活跃度列表"
|
||||
"describe": "公会系统"
|
||||
},
|
||||
{
|
||||
"msgid": "viking.ranklist",
|
||||
|
@ -45,10 +45,6 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (cod
|
||||
if target == nil {
|
||||
continue
|
||||
}
|
||||
// 申请过的在线好友,设置申请状态
|
||||
if _, ok := utils.Findx(target.ApplyIds, self.Uid); ok {
|
||||
base.IsApplied = true
|
||||
}
|
||||
|
||||
if _, ok := utils.Findx(target.ZanIds, self.Uid); ok {
|
||||
base.IsZaned = true
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
@ -38,13 +39,23 @@ func (this *apiComp) Search(session comm.IUserSession, req *pb.FriendSearchReq)
|
||||
if u.Uid == session.GetUserId() {
|
||||
continue
|
||||
}
|
||||
resp.Friends = append(resp.Friends, &pb.FriendBase{
|
||||
base := &pb.FriendBase{
|
||||
UserId: u.Uid,
|
||||
NickName: u.Name,
|
||||
Level: u.Lv,
|
||||
Avatar: u.Avatar,
|
||||
ServerId: u.Sid,
|
||||
})
|
||||
}
|
||||
|
||||
target := this.moduleFriend.modelFriend.GetFriend(u.Uid)
|
||||
if target == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if _, ok := utils.Findx(target.ApplyIds,uid); ok {
|
||||
base.IsApplied = true
|
||||
}
|
||||
resp.Friends = append(resp.Friends, base)
|
||||
}
|
||||
|
||||
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeSearch, resp); err != nil {
|
||||
|
@ -54,16 +54,17 @@ func (this *apiComp) Zan(session comm.IUserSession, req *pb.FriendZanReq) (code
|
||||
if _, ok := utils.Find(target.ZanIds, selfId); !ok {
|
||||
pointTotal += 1
|
||||
target.ZanIds = append(target.ZanIds, selfId)
|
||||
target.GetZandIds = append(target.GetZandIds, selfId)
|
||||
//设置被点赞玩家
|
||||
if err = this.moduleFriend.modelFriend.Change(target.GetUid(), map[string]interface{}{
|
||||
"zanIds": target.ZanIds,
|
||||
"zanIds": target.ZanIds,
|
||||
"getZandIds": target.GetZandIds,
|
||||
}); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
this.moduleFriend.Error("点赞", log.Fields{"uid": uid, "err": err.Error()})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//设置友情值
|
||||
ue, err := this.moduleFriend.ModuleUser.GetUserExpand(session.GetUserId())
|
||||
|
@ -41,9 +41,8 @@ func (this *apiComp) Zanreceive(session comm.IUserSession, req *pb.FriendZanrece
|
||||
|
||||
// 是否已领取点赞
|
||||
for _, v := range req.FriendIds {
|
||||
if _, ok := utils.Find(self.GetZandIds, v); !ok {
|
||||
|
||||
self.GetZandIds = append(self.GetZandIds, v)
|
||||
if _, ok := utils.Find(self.GetZandIds, v); ok {
|
||||
self.GetZandIds = utils.Deletex(self.GetZandIds,v)
|
||||
pointTotal += 1
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user