1468 lines
36 KiB
Lua
1468 lines
36 KiB
Lua
|
||
NewGroupController = {}
|
||
|
||
local M = {}
|
||
|
||
local GroupMgrController = import(".GroupMgrController")
|
||
|
||
--- Create a new NewGroupController
|
||
function NewGroupController.new()
|
||
setmetatable(M, {__index = IController})
|
||
local self = setmetatable({}, {__index = M})
|
||
self.baseType = NewGroupController
|
||
self.class = "NewGroup"
|
||
return self
|
||
end
|
||
|
||
|
||
--获取圈列表
|
||
function M:FG_GroupList(callback)
|
||
local _client = ControllerManager.GroupClient
|
||
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww")
|
||
--pt(_client)
|
||
_client:send(Protocol.WEB_FG_GROUP_LIST, nil, function(res)
|
||
printlog("aaaaaaaaaaaaaaaaawwwwwwwwwwwwww1111111111111")
|
||
pt(res)
|
||
if res.ReturnCode == 0 then
|
||
local r_groups = res.Data.groups
|
||
local l_groups = DataManager.groups
|
||
l_groups:clear()
|
||
for i=1,#r_groups do
|
||
local tem = r_groups[i]
|
||
local group = GroupData.new()
|
||
group.id = tem.id
|
||
group.name = tem.name
|
||
group.owner = tem.owner
|
||
group.top_time = tem.top_time
|
||
group.o_nick = tem.o_nick
|
||
group.o_portrait = tem.o_portrait
|
||
group.lev = tem.lev
|
||
group.pay_type = tem.pay_type
|
||
group.type = tem.type
|
||
group.total_member_num = tem.member_num
|
||
group.room_num = tem.room_num
|
||
group.option = tem.option
|
||
group.show_num = tem.show_num
|
||
l_groups:add(group)
|
||
end
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--创建圈
|
||
function M:FG_CreateGroup(name, pay_type, type, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.name= name
|
||
data.pay_type = pay_type
|
||
data.type = type
|
||
_client:send(Protocol.WEB_FG_CREATE_GROUP, data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local l_groups = DataManager.groups
|
||
local tem = res.Data.info
|
||
local group = GroupData.new()
|
||
group.id = tem.id
|
||
group.name = tem.name
|
||
group.owner = DataManager.SelfUser.account_id
|
||
group.o_nick = DataManager.SelfUser.nick_name
|
||
group.o_portrait = DataManager.SelfUser.head_url
|
||
group.lev = 1
|
||
group.pay_type = pay_type
|
||
group.type = type
|
||
group.total_member_num = 1
|
||
l_groups:add(group)
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--删除圈
|
||
function M:FG_RemoveGroup(id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = id
|
||
_client:send(Protocol.WEB_FG_REMOVE_GROUP, data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local l_groups = DataManager.groups
|
||
l_groups:del(id)
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--退出圈子
|
||
function M:FG_ExitGroup(group_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
_client:send(Protocol.WEB_FG_EXIT_GROUP, data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local l_groups = DataManager.groups
|
||
l_groups:del(group_id)
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--加入圈
|
||
function M:FG_JoinGroup(id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = id
|
||
_client:send(Protocol.WEB_FG_JOIN_GROUP, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--置顶圈
|
||
function M:FG_TopGroup(group_id,top,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.top = top
|
||
_client:send(Protocol.WEB_FG_GROUP_TOP, data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local l_groups = DataManager.groups
|
||
local group = l_groups:get(group_id)
|
||
group.top_time = res.Data.top_time
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_UpdateGroupInfo(id, name, notice, ban, dissolve_opt, kick_opt, apply, ban_chat1, ban_chat2, option, showNum, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = id
|
||
data.name = name
|
||
data.notice = notice
|
||
data.ban = ban
|
||
data.dissolve_opt = dissolve_opt
|
||
data.kick_opt = kick_opt
|
||
data.ban_apply = apply
|
||
data.ban_chat1 = ban_chat1
|
||
data.ban_chat2 = ban_chat2
|
||
data.option = option
|
||
data.show_num = showNum
|
||
_client:send(Protocol.WEB_FG_UPDATE_GROUP_INFO, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--圈邀请列表
|
||
function M:FG_GroupJoins(id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = id
|
||
_client:send(Protocol.WEB_FG_GROUP_JOINS, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--圈审核玩家加入
|
||
function M:FG_GroupVerifyJoin(id,tagId,allow,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = id
|
||
data.tagId = tagId
|
||
data.allow = allow
|
||
_client:send(Protocol.WEB_FG_GROUP_VERIFY_JOIN, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--圈玩家列表
|
||
function M:FG_GroupMembers(group_id, limit, num, minus_only, sort_type, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.minus_only = minus_only
|
||
data.type = sort_type
|
||
--print(debug.traceback())
|
||
_client:send(Protocol.WEB_FG_GROUP_MEMBERS, data, function(res)
|
||
--print("查询圈子玩家列表============")
|
||
--pt(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local members = res.Data.members
|
||
for i=1,#members do
|
||
local m = members[i]
|
||
group:addMember(m)
|
||
end
|
||
end
|
||
callback(res)
|
||
|
||
end)
|
||
end
|
||
|
||
|
||
function M:FG_GroupMembers11(group_id, limit, num, minus_only, sort_type, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.minus_only = minus_only
|
||
data.type = sort_type
|
||
self.currentGroupMembersData=data
|
||
self.currentGroupMembersCallBack=callback
|
||
--print(debug.traceback())
|
||
_client:send(Protocol.WEB_FG_GROUP_MEMBERS, data, function(res)
|
||
--print("查询圈子玩家列表============")
|
||
--pt(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local members = res.Data.members
|
||
for i=1,#members do
|
||
local m = members[i]
|
||
group:addMember(m)
|
||
end
|
||
end
|
||
callback(res)
|
||
|
||
end)
|
||
end
|
||
|
||
function M:FG_GroupMembers12(group_id, limit, num,type,online, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.online = online
|
||
data.type = type
|
||
--data.minus_only = minus_only
|
||
--data.type = sort_type
|
||
self.currentGroupMembersData=data
|
||
self.currentGroupMembersCallBack=callback
|
||
--print(debug.traceback())
|
||
_client:send(Protocol.WEB_FG_GROUP_MEMBERS1, data, function(res)
|
||
--print("查询圈子玩家列表============")
|
||
--pt(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local members = res.Data.members
|
||
for i=1,#members do
|
||
local m = members[i]
|
||
group:addMember(m)
|
||
end
|
||
end
|
||
callback(res)
|
||
|
||
end)
|
||
end
|
||
|
||
function M:FG_GroupTiChu(group_id,limit, num,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
_client:send(Protocol.WEB_FG_GROUP_TICHU, data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
function M:SendGetGroupMembersInfo()
|
||
local _client = ControllerManager.GroupClient
|
||
if self.currentGroupMembersData and self.currentGroupMembersCallBack then
|
||
_client:send(Protocol.WEB_FG_GROUP_MEMBERS1, self.currentGroupMembersData, function(res)
|
||
--print("查询圈子玩家列表============")
|
||
--pt(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(self.currentGroupMembersData.id)
|
||
local members = res.Data.members
|
||
for i=1,#members do
|
||
local m = members[i]
|
||
group:addMember(m)
|
||
end
|
||
end
|
||
self.currentGroupMembersCallBack(res)
|
||
|
||
end)
|
||
end
|
||
|
||
end
|
||
|
||
-- 查询成员
|
||
function M:FG_FindMember(group_id, member_id, callback, tag_name,tag_type)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = member_id
|
||
data.tagName = tag_name
|
||
data.tagType = tag_type
|
||
_client:send(Protocol.WEB_FG_FIND_MEMBER, data, function(res)
|
||
--print("查询圈子单个玩家列表============")
|
||
--pt(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local m = res.Data
|
||
if group.lev == 3 then
|
||
if res.Data.parentId == DataManager.SelfUser.account_id then
|
||
group:addMember(m)
|
||
end
|
||
end
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
|
||
-- 强制提取
|
||
function M:FG_TakeHp1(group_id, tagId, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = tagId
|
||
|
||
_client:send(Protocol.WEB_FG_TAKE_HP, data, function(res)
|
||
--print("查询圈子单个玩家列表============")
|
||
--pt(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 调配成员
|
||
function M:FG_DeployMember(group_id, member_id, partner_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = member_id
|
||
data.parId = partner_id
|
||
_client:send(Protocol.WEB_FG_DEPLOY_MEMBER, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 转移合伙人
|
||
function M:FG_MovePartner(group_id, member_id, partner_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = member_id
|
||
data.parId = partner_id
|
||
_client:send(Protocol.WEB_FG_MOVE_PARTNER, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取合伙人列表(合伙人管理)
|
||
function M:FG_GetPartnerList(group_id, simple_all, limit, num ,callback,tagId)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.simple_all = simple_all
|
||
if tagId then
|
||
data.tagId = tagId
|
||
end
|
||
if simple_all == 0 then
|
||
data.limit = limit
|
||
data.num = num
|
||
end
|
||
_client:send(Protocol.WEB_FG_GET_PARTNER_DATA, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取合伙人列表(合伙人管理)
|
||
function M:FG_QueryPartnerList(group_id, query_id, query_nick, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
|
||
data.id = group_id
|
||
data.qid = query_id
|
||
data.tagName = query_nick
|
||
|
||
_client:send(Protocol.WEB_FG_QUERY_PARTNER_DATA, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetMemberStat(group_id,query_id,partner_id,limit,num,time_type,begin_time,end_time,callback)
|
||
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.qid = query_id
|
||
data.partner_id = partner_id
|
||
data.tt = time_type
|
||
if time_type == 3 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
data.limit = limit
|
||
data.num = num
|
||
_client:send(Protocol.WEB_FG_GET_MEMBER_STAT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
function M:FG_GetPartnerStat(group_id,limit,num,time_type,begin_time,end_time,callback)
|
||
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
data.limit = limit
|
||
data.num = num
|
||
_client:send(Protocol.WEB_FG_GET_PARTNER_STAT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetZuanShiStat(group_id,limit,num,time_type,begin_time,end_time,callback)
|
||
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
data.limit = limit
|
||
data.num = num
|
||
_client:send(Protocol.WEB_FG_GET_COST_COUNT_STAT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- WEB_FG_FIND_PARTNER_STAT
|
||
function M:FG_FindPartnerStat(group_id,member_id,limit,num,time_type,begin_time,end_time,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = member_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.tt = time_type
|
||
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
_client:send(Protocol.WEB_FG_FIND_PARTNER_STAT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_FindZuanShiStat(group_id,member_id,limit,num,time_type,begin_time,end_time,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = member_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.tt = time_type
|
||
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
_client:send(Protocol.WEB_FG_FIND_COST_COUNT_STAT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--find_partner_stat_member
|
||
|
||
-- WEB_FG_FIND_PARTNER_STAT
|
||
function M:FG_FindPartnerStatMember(group_id,uid,root_uid,member_id,limit,num,time_type,begin_time,end_time,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = member_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.id = group_id
|
||
data.tt = time_type
|
||
data.uid = uid
|
||
data.root_uid = 0
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
_client:send(Protocol.WEB_FG_FIND_PARTNER_STAT_Member, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_FindPartnerZuanShiMember(group_id,uid,root_uid,member_id,limit,num,time_type,begin_time,end_time,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = member_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.id = group_id
|
||
data.tt = time_type
|
||
data.uid = uid
|
||
data.root_uid = 0
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
_client:send(Protocol.WEB_FG_FIND_PARTNER_COST_COUNT_Member, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetXingYunStat(group_id,limit,num,time_type,begin_time,end_time,callback)
|
||
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
data.limit = limit
|
||
data.num = num
|
||
_client:send(Protocol.WEB_FG_GET_XINGYUNHAO_INFO, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetMembersCount(group_id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
|
||
_client:send(Protocol.WEB_FG_GET_MEMBERS_COUNT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetPartnerStatMember(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback)
|
||
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
|
||
data.id = group_id
|
||
data.uid = uid
|
||
data.limit = limit
|
||
data.num = num
|
||
data.root_uid = root_uid
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
|
||
_client:send(Protocol.WEB_FG_GET_PARTNER_STAT_MEMBER, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetDirectMemberStat(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.uid = uid
|
||
data.limit = limit
|
||
data.num = num
|
||
data.root_uid = root_uid
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
_client:send(Protocol.WEB_FG_GET_DIRECT_MEMBER_STAT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetPartnerZuanShiMember(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback)
|
||
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
|
||
data.id = group_id
|
||
data.uid = uid
|
||
data.limit = limit
|
||
data.num = num
|
||
data.root_uid = root_uid
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
|
||
_client:send(Protocol.WEB_FG_GET_PARTNER_COST_COUNT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetDirectZuanShiStat(group_id,uid,root_uid,limit,num,time_type,begin_time,end_time,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.uid = uid
|
||
data.limit = limit
|
||
data.num = num
|
||
data.root_uid = root_uid
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
_client:send(Protocol.WEB_FG_GET_DIRECT_COST_COUNT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetPartnerStatPlay(group_id,uid,parent_id,limit,num,time_type,begin_time,end_time,callback)
|
||
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
|
||
data.id = group_id
|
||
data.uid = uid
|
||
data.parent_id = parent_id
|
||
data.limit = limit
|
||
data.num = num
|
||
|
||
data.tt = time_type
|
||
if time_type == 0 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
|
||
_client:send(Protocol.WEB_FG_GET_PARTNER_STAT_PLAY, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
-- 获取合伙人成员列表
|
||
function M:FG_GetPartnerMembers(group_id, partner_id, limit, num, quary_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = partner_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.qid = quary_id
|
||
_client:send(Protocol.WEB_FG_GET_PARTNER_MEMBERS, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取管理员/合伙人上下分
|
||
function M:FG_GetMngHpLog(group_id, limit, num, hp_type, qid, qName, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.type = hp_type
|
||
data.qid = qid
|
||
data.tagName = qName
|
||
_client:send(Protocol.WEB_FG_GET_MNG_HP_LOG, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取管理员上下分统计
|
||
function M:FG_GetMngHpStatistic(group_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
_client:send(Protocol.WEB_FG_MNG_HP_STATISTIC, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取管理员上下分详情
|
||
function M:FG_GetMngHpInfo(group_id, type, begin_time, end_time, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.type = type
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
_client:send(Protocol.WEB_FG_MNG_HP_INFO, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取整线体力值
|
||
function M:FG_GetTotalHp(group_id, id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = id
|
||
_client:send(Protocol.GET_HP_TOTAL, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取玩家体力值日统计
|
||
function M:FG_GetPlayerDailyHPCount(group_id, id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = id
|
||
_client:send(Protocol.WEB_FG_GET_PLAYER_DAILY_COUNT, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取体力值日志牌局明细
|
||
function M:FG_GetHpLogDetail(group_id, id, roomid, time, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = id
|
||
data.roomId = roomid
|
||
data.time = time
|
||
_client:send(Protocol.WEB_FG_HPLOG_DETAIL_INFO, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取推广奖励值
|
||
function M:FG_GetRewards(group_id, pid, lev, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = pid
|
||
data.partnerLev = lev
|
||
_client:send(Protocol.WEB_FG_GET_REWARDS, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 设置推广奖励值
|
||
function M:FG_SetRewards(group_id, tag, lev, partner_id, all, val, single,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.pid = tag
|
||
data.partnerLev = lev
|
||
data.value = val
|
||
data.tagId = partner_id
|
||
data.all = all
|
||
data.single = single
|
||
_client:send(Protocol.WEB_FG_SET_REWARDS, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_SetXIPAI(group_id, tag, lev, partner_id, all, val, single,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.pid = tag
|
||
data.partnerLev = lev
|
||
data.value = val
|
||
data.tagId = partner_id
|
||
data.all = all
|
||
data.single = single
|
||
_client:send(Protocol.WEB_FG_SET_XIPAI, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
-- 获取奖励日志
|
||
function M:FG_GetRewardsLog(group_id, limit, num, begin_time, end_time, tag, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = tag
|
||
data.limit = limit
|
||
data.num = num
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
_client:send(Protocol.WEB_FG_GET_REWARDS_LOG, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取奖励统计
|
||
function M:FG_GetRewardStatistic(group_id, pid, begin_time, end_time, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.pid = pid
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
_client:send(Protocol.WEB_FG_GET_REWARDS_STATISTIC, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 排行
|
||
function M:FG_GetMemberRank(group_id, pid, limit, num, begin_time, end_time, type,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.pid = pid
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
data.limit = limit
|
||
data.num = num
|
||
data.type = type
|
||
_client:send(Protocol.WEB_FG_MEMBER_RANK, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 局数统计
|
||
function M:FG_GetRoundStat(group_id, pid, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.pid = pid
|
||
_client:send(Protocol.WEB_FG_GET_ROUND_STATISTIC, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取成员体力值日志
|
||
function M:FG_GetMemberHpLog(group_id, tag, limit, num, filter, begin_time, end_time, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = tag
|
||
data.limit = limit
|
||
data.num = num
|
||
data.choose = filter
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
_client:send(Protocol.WEB_FG_GET_MEMBER_HP_LOG, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取玩法局数统计
|
||
function M:FG_GetGameStat(group_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
_client:send(Protocol.WEB_FG_GET_GAME_ROUND_STATISTIC, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取消费统计
|
||
function M:FG_GetConsumeStat(group_id,begin_time, end_time, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
_client:send(Protocol.WEB_FG_GET_CONSUME_STATISTIC, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取赢家抽水记录
|
||
function M:FG_GetPropLog(group_id, limit, num, begin_time, end_time, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
_client:send(Protocol.WEB_FG_GET_PROPORTION_LOG, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取战绩
|
||
function M:FG_GetGroupRecord(group_id, platform, qid, limit, num, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.qid = qid
|
||
data.platform = platform
|
||
data.limit = limit
|
||
data.num = num
|
||
_client:send(Protocol.WEB_FG_GET_RECORD, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取战绩
|
||
function M:FG_GetGroupRecordSpe(group_id, platform, qid, includeMembers, limit, num, begin_time, end_time, time_type, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.qid = qid
|
||
data.platform = platform
|
||
data.includeMembers = includeMembers
|
||
data.limit = limit
|
||
data.num = num
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
data.tt = time_type
|
||
_client:send(Protocol.WEB_FG_GET_RECORD, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取战绩
|
||
function M:FG_GetGroupPersonRecord(group_id, platform, qid, time_type, begin_time, end_time, limit, num, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.qid = qid
|
||
data.tt = time_type
|
||
if time_type == 3 then
|
||
data.bt = begin_time
|
||
data.et = end_time
|
||
end
|
||
data.platform = platform
|
||
data.limit = limit
|
||
data.num = num
|
||
_client:send(Protocol.WEB_FG_GET_PERSON_RECORD, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
-- 根据房间号查询战绩
|
||
function M:FG_GetRecordByRoomid(group_id, roomid, platform, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.roomid = roomid
|
||
data.platform = platform
|
||
_client:send(Protocol.WEB_FG_GET_RECORD_BY_ROOMID, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取能量包数据
|
||
function M:FG_GetTakeInfo(group_id, tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = tagId
|
||
_client:send(Protocol.WEB_FG_GET_TAKE_INFO, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
-- 获取银行信息
|
||
function M:FG_GetBankInfo(group_id, tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.tagId = tagId
|
||
_client:send(Protocol.GET_BANK_HP, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
|
||
function M:FG_TakeBankInfo(group_id, gethp,tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.hp=gethp
|
||
data.tagId = tagId
|
||
_client:send(Protocol.TAKE_BANK_HP, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
function M:FG_SAVEBankInfo(group_id, gethp,tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.hp=gethp
|
||
data.tagId = tagId
|
||
_client:send(Protocol.SAVE_BANK_HP, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
|
||
|
||
|
||
-- 提取体力值
|
||
function M:FG_TakeHp(group_id, num, tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.hp = num
|
||
data.tagId = tagId
|
||
_client:send(Protocol.WEB_FG_TAKE_FAG, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取提取记录
|
||
function M:FG_GetTakeLog(group_id, limit, num, begin_time, end_time, tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
data.tagId = tagId
|
||
_client:send(Protocol.WEB_FG_FAG_TAKE_LOG, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
-- 获取提取记录
|
||
function M:FG_GetBankLog(group_id, limit, num, begin_time, end_time, tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
data.limit = limit
|
||
data.num = num
|
||
data.beginTime = begin_time
|
||
data.endTime = end_time
|
||
data.tagId = tagId
|
||
_client:send(Protocol.WEB_FG_GET_BANK_LOG, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
-- 获取能量包统计
|
||
function M:FG_GetFagPackInfo(group_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = group_id
|
||
_client:send(Protocol.WEB_FG_FAG_PACK_INFO, data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
--圈删除玩家
|
||
function M:FG_GroupRemoveMember(id,tagId,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local data = {}
|
||
data.id = id
|
||
data.tagId = tagId
|
||
_client:send(Protocol.WEB_FG_GROUP_KICK, data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(id)
|
||
group:delMember(tagId)
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
function M:FG_GroupSetVip(group_id, member_id, isvip, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_data.isvip = isvip
|
||
_client:send(Protocol.WEB_FG_SET_GROUP_VIP, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local member = group:getMember(member_id)
|
||
if member then
|
||
member.isvip = isvip
|
||
end
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
function M:FG_EnterGroup(group_id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
printlog("FG_EnterGroup===>>>",_data.id)
|
||
_client:send(Protocol.WEB_ENTER_GROUP, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
-- 获取玩法列表
|
||
local group = DataManager.groups:get(group_id)
|
||
group:clear()
|
||
group.notice = res.Data.notice
|
||
group.hide_action = res.Data.hide_action
|
||
|
||
self.mgr_ctr = ControllerManager.GetController(GroupMgrController)
|
||
self.mgr_ctr:connect(res.Data.host,group_id,function(res1)
|
||
if res1.ReturnCode == 0 then
|
||
callback(res)
|
||
else
|
||
callback(res1)
|
||
end
|
||
end)
|
||
else
|
||
callback(res)
|
||
end
|
||
|
||
end)
|
||
end
|
||
|
||
function M:FG_ExitGroupMgr()
|
||
if self.mgr_ctr then
|
||
self.mgr_ctr:disconnect()
|
||
end
|
||
end
|
||
|
||
--指定圈删除房间
|
||
function M:FG_RemoveRoom(group_id,roomid,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.roomId = roomid
|
||
_client:send(Protocol.WEB_FG_DEL_ROOM, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local _data = {}
|
||
_data.room = roomid
|
||
callback(res)
|
||
else
|
||
callback(res)
|
||
end
|
||
end)
|
||
end
|
||
|
||
--授权副盟主 opt 1设置 2取消
|
||
function M:FG_SetManager(group_id, member_id, opt, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_data.opt = opt
|
||
_client:send(Protocol.WEB_FG_SET_MANAGER, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local member = group:getMember(member_id)
|
||
if member then
|
||
member.lev = opt + 1
|
||
member.permission = res.Data.permission
|
||
end
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 设置成员禁止娱乐
|
||
function M:FG_BanMember(group_id, member_id, ban, opType, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_data.ban = ban
|
||
_data.opType = opType
|
||
_client:send(Protocol.WEB_FG_BAN_MEMBER, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local member = group:getMember(member_id)
|
||
if member then
|
||
member.ban = ban
|
||
end
|
||
end
|
||
callback(res)
|
||
self:SendGetGroupMembersInfo()
|
||
end)
|
||
end
|
||
|
||
|
||
-- 获取成员调度
|
||
function M:FG_GetBanMemberHB(group_id, member_id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_client:send(Protocol.GROUP_GET_BLACK_MEMBER, _data, function(res)
|
||
callback(res)
|
||
|
||
end)
|
||
end
|
||
|
||
|
||
-- 设置成员调度
|
||
function M:FG_BanMemberHB(group_id, member_id,opt,ban_rate,black_max_value,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_data.ban =opt
|
||
_data.opType = 2
|
||
_data.ban_rate = ban_rate
|
||
_data.ban_max_value = black_max_value
|
||
|
||
_client:send(Protocol.GROUP_BLACK_MEMBER, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local member = group:getMember(member_id)
|
||
if member then
|
||
member.group_black=opt
|
||
end
|
||
end
|
||
callback(res)
|
||
|
||
end)
|
||
end
|
||
|
||
|
||
-- 设置禁止同桌
|
||
function M:FG_SetBanTable(group_id, member_id, list, del_list, callback)
|
||
if #list == 0 then table.insert(list, 0) end
|
||
if #del_list == 0 then table.insert(del_list, 0) end
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_data.ban_list = list
|
||
_data.del_list = del_list
|
||
_client:send(Protocol.WEB_FG_SET_BAN_TABLE, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_GetBanTable(group_id, member_id, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_client:send(Protocol.WEB_FG_GET_BAN_TABLE, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
function M:GetAddMember(group_id,member_id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_client:send(Protocol.GET_PLAYER_INFO, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
|
||
--添加成员
|
||
function M:FG_AddMember(group_id,member_id,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = member_id
|
||
_client:send(Protocol.WEB_FG_INVITE_MEMBER, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 改变体力值
|
||
function M:FG_ChangeFag(group_id,member_id,fag,callback )
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tag = member_id
|
||
_data.hp = fag
|
||
_client:send(Protocol.WEB_FG_CHANGE_FAG, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取合伙人列表
|
||
function M:FG_PartnerList(group_id, index, num, qid, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.limit = index
|
||
_data.num = num
|
||
_data.qid = qid or 0
|
||
_client:send(Protocol.WEB_FG_GET_PARTNERS, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 设置合伙人权限 opt 1设置,2取消
|
||
function M:FG_SetPartner(group_id, id, opt, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = id
|
||
_data.opt = opt
|
||
_client:send(Protocol.WEB_FG_SET_PARTNER, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local member = group:getMember(id)
|
||
if member then
|
||
member.partnerLev = res.Data.partnerLev
|
||
member.partnerId = DataManager.SelfUser.account_id
|
||
end
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 设置管理员权限
|
||
function M:FG_SetMngPermission(group_id, target, permission, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tagId = target
|
||
_data.permission = permission
|
||
_client:send(Protocol.WEB_FG_SET_MNG_PERMISSION, _data, function(res)
|
||
if res.ReturnCode == 0 then
|
||
local group = DataManager.groups:get(group_id)
|
||
local member = group:getMember(target)
|
||
if member then
|
||
member.permission = permission
|
||
end
|
||
end
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 获取圈子邮件列表
|
||
function M:FG_GetMailList(group_id, uid, index, num, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.uid = uid
|
||
_data.limit = index
|
||
_data.num = num
|
||
_client:send(Protocol.WEB_FG_GET_MAIL_LIST, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 删除所有邮件
|
||
function M:FG_DelAllMail(group_id, uid, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.uid = uid
|
||
_client:send(Protocol.WEB_FG_DEL_ALL_MAIL, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 设置成员备注
|
||
function M:FG_SetMemberTag(group_id, uid, score, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tag = uid
|
||
_data.score = score
|
||
_client:send(Protocol.WEB_FG_SET_MEMBER_TAG, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 设置成员标注
|
||
function M:FG_SetMemberBind(group_id, uid, score, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.tag = uid
|
||
_data.score = score
|
||
_client:send(Protocol.WEB_FG_SET_MEMBER_BIND, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
-- 设置亲友圈合伙人阀值
|
||
|
||
function M:FG_SetPartnerThreshold(group_id, uid, score, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.uid = uid
|
||
_data.score = score
|
||
_client:send(Protocol.WEB_FG_SET_AUTO_SCORE, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_StopService(group_id,ban,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.ban = ban == 1 and true or false
|
||
_client:send(Protocol.WEB_FG_STOP_SERVICE, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_AddPlay(group_id, game_id, config_data, name, hpData, hpOnOff, gtype, deskId, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.config = config_data
|
||
_data.name = name
|
||
_data.gameId = game_id
|
||
_data.hpData = hpData
|
||
_data.hpOnOff = hpOnOff
|
||
_data.gtype = gtype
|
||
_data.deskId = deskId
|
||
_client:send(Protocol.WEB_FG_ADD_PLAY, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_DelPlay(group_id,pid,callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.pid = pid
|
||
_client:send(Protocol.WEB_FG_DEL_PLAY, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_BanPlay(group_id, pid, ban, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.pid = pid
|
||
_data.ban = ban
|
||
_client:send(Protocol.WEB_FG_BAN_PLAY, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_MarkPlay(group_id, pid, ban, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.pid = pid
|
||
_data.mark = ban
|
||
_client:send(Protocol.GROUP_MARK_PLAY, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end
|
||
|
||
function M:FG_UpdatePlay(group_id, game_id, config_data, name, hpData, hpOnOff, pid, gtype, deskId, callback)
|
||
local _client = ControllerManager.GroupClient
|
||
local _data = {}
|
||
_data.id = group_id
|
||
_data.config = config_data
|
||
_data.name = name
|
||
_data.gameId = game_id
|
||
_data.hpData = hpData
|
||
_data.hpOnOff = hpOnOff
|
||
_data.pid = pid
|
||
_data.gtype = gtype
|
||
_data.deskId = deskId
|
||
_client:send(Protocol.WEB_FG_UPDATE_PLAY, _data, function(res)
|
||
callback(res)
|
||
end)
|
||
end |