277 lines
13 KiB
Objective-C
277 lines
13 KiB
Objective-C
//
|
||
// Api+Guild.m
|
||
// YuMi
|
||
//
|
||
// Created by YuMi on 2022/4/6.
|
||
//
|
||
|
||
#import "Api+Guild.h"
|
||
|
||
@implementation Api (Guild)
|
||
|
||
/// 获取家族详情
|
||
/// @param completion 完成
|
||
/// @param uid 族长的uid
|
||
+ (void)getClanDetailInfo:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
|
||
[self makeRequest:@"clan/getUserHallAndClan" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, nil];
|
||
}
|
||
|
||
/// 获取公会中房间列表
|
||
/// @param completion 完成
|
||
/// @param clanId 公会的id
|
||
+ (void)getRoomListInClan:(HttpRequestHelperCompletion)completion clanId:(NSString *)clanId {
|
||
[self makeRequest:@"clan/listHall" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,clanId, nil];
|
||
}
|
||
|
||
/// 公会成员列表
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param page 当前的页数
|
||
/// @param pageSize 每页多少个
|
||
+ (void)getClanMemberList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize {
|
||
[self makeRequest:@"clan/listMember" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, page, pageSize,nil];
|
||
}
|
||
|
||
/// 房间成员列表
|
||
/// @param completion 完成
|
||
/// @param hallId 用户的uid
|
||
/// @param page 当前的页数
|
||
/// @param pageSize 每页多少个
|
||
+ (void)getGuildMemberList:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId page:(NSString *)page pageSize:(NSString *)pageSize {
|
||
[self makeRequest:@"hall/getAllMembers" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, hallId, page, pageSize,nil];
|
||
}
|
||
|
||
/// 公会成员列表搜索某人
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param page 当前的页数
|
||
/// @param pageSize 每页多少个
|
||
/// @param queryStr 搜索的关键字
|
||
+ (void)searchClanMemberList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize queryStr:(NSString *)queryStr {
|
||
[self makeRequest:@"clan/listMember" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, page, pageSize, queryStr,nil];
|
||
}
|
||
|
||
/// 更新房间的名称
|
||
/// @param completion 完成
|
||
/// @param hallName 公会的名称
|
||
/// @param hallId 公会的id
|
||
+ (void)updateGuildRoomName:(HttpRequestHelperCompletion)completion hallName:(NSString *)hallName hallId:(NSString *)hallId uid:(NSString *)uid {
|
||
[self makeRequest:@"hall/updateHallName" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, hallName, hallId, uid, nil];
|
||
}
|
||
|
||
/// 获取公会房间成员权限
|
||
/// @param completion 完成
|
||
/// @param hallId 公会的id
|
||
/// @param uid 用户的uid
|
||
+ (void)getGuildRoomAuth:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId uid:(NSString *)uid {
|
||
[self makeRequest:@"hallAuth/getHallAuths" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, hallId, uid, nil];
|
||
}
|
||
|
||
/// 搜索
|
||
/// @param completion 完成
|
||
/// @param key 关键字
|
||
/// @param type 类型 1 房间 2 用户
|
||
/// @param page 多少页
|
||
/// @param pageSize 每页多少个
|
||
+ (void)guildSearchUserCompletion:(HttpRequestHelperCompletion)completion key:(NSString *)key type:(NSString *)type page:(NSString *)page pageSize:(NSString *)pageSize {
|
||
[self makeRequest:@"search/room" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, key, type, page, pageSize, nil];
|
||
}
|
||
|
||
/// 移除公会成员
|
||
/// @param completion 完成
|
||
/// @param uid uid
|
||
/// @param targetUid 移除的人的uid
|
||
/// @param hallId 公会的id
|
||
+ (void)removeGuildMemberCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid targetUid:(NSString *)targetUid hallId:(NSString *)hallId {
|
||
[self makeRequest:@"hall/remove" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid,targetUid, hallId, nil];
|
||
}
|
||
|
||
/// 邀请用户加入公会
|
||
/// @param completion 完成
|
||
/// @param hallId 公会的id
|
||
/// @param uid 用户的uid
|
||
/// @param targetUid 目标用户的uid
|
||
+ (void)inviteMemberCompletion:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId uid:(NSString *)uid targetUid:(NSString *)targetUid {
|
||
[self makeRequest:@"hall/invite" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, hallId, uid, targetUid, nil];
|
||
}
|
||
|
||
/// 获取公会房间管理列表
|
||
/// @param completion 完成
|
||
/// @param hallId 公会的id
|
||
/// @param page 当前的页数
|
||
/// @param pageSize 一页多少个
|
||
+ (void)getGuildRoomManagerCompletion:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId page:(NSString *)page pageSize:(NSString *)pageSize {
|
||
[self makeRequest:@"hall/getHallManager" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, hallId, page, pageSize, nil];
|
||
}
|
||
|
||
/// 设置房间管理
|
||
/// @param completion 完成
|
||
/// @param hallId 公会的id
|
||
/// @param uid 用户的uid
|
||
/// @param targetUid 目标用户的uid
|
||
+ (void)guildRoomSetManagerCompletion:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId uid:(NSString *)uid targetUid:(NSString *)targetUid {
|
||
[self makeRequest:@"hall/setManager" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, hallId, uid, targetUid, nil];
|
||
}
|
||
|
||
/// 取消设置房间管理
|
||
/// @param completion 完成
|
||
/// @param hallId 公会的id
|
||
/// @param uid 用户的uid
|
||
/// @param targetUid 目标用户的uid
|
||
+ (void)guildRoomCancelManagerCompletion:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId uid:(NSString *)uid targetUid:(NSString *)targetUid {
|
||
[self makeRequest:@"hall/removeManager" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, hallId, uid, targetUid, nil];
|
||
}
|
||
|
||
/// 公会管理权限
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param managerUid 管理的uid
|
||
+ (void)guildManagerAuthCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid managerUid:(NSString *)managerUid {
|
||
[self makeRequest:@"hallAuth/getHallManagerAuths" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, managerUid, nil];
|
||
}
|
||
|
||
/// 设置公会管理权限
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param managerUid 管理的uid
|
||
/// @param authStr 权限的字段
|
||
+ (void)setGuildManagerAuthCompletion:(HttpRequestHelperCompletion)completion uid:(NSString *)uid managerUid:(NSString *)managerUid hallId:(NSString *)hallId authStr:(NSString *)authStr {
|
||
[self makeRequest:@"hallAuth/setHallManagerAuths" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, managerUid, hallId,authStr, nil];
|
||
}
|
||
|
||
/// 退出房间
|
||
/// @param completion 完成
|
||
/// @param uid 自己的UID
|
||
+ (void)quitGuildRoom:(HttpRequestHelperCompletion)completion uid:(NSString *)uid {
|
||
[self makeRequest:@"hall/quit" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, nil];
|
||
}
|
||
|
||
|
||
/// 申请加入公会房间
|
||
/// @param completion 完成
|
||
/// @param hallId 公会的id
|
||
/// @param uid 要加入用户的uid
|
||
+ (void)memberApplyHall:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId uid:(NSString *)uid {
|
||
[self makeRequest:@"hall/apply" method:HttpRequestHelperMethodPOST completion:completion,__FUNCTION__, hallId, uid, nil];
|
||
}
|
||
|
||
#pragma mark - 收入统计
|
||
|
||
/// 家族收入列表
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param clanId 家族的id
|
||
/// @param startTime 开始时间
|
||
/// @param endTime 结束时间
|
||
+ (void)getClanIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid clanId:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
||
[self makeRequest:@"clan/income/totalList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, clanId, startTime, endTime, nil];
|
||
}
|
||
|
||
/// 公会收入列表
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param hallId 家族的id
|
||
/// @param startTimeStr 开始时间
|
||
/// @param endTimeStr 结束时间
|
||
+ (void)getGuildIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid hallId:(NSString *)hallId startTimeStr:(NSString *)startTimeStr endTimeStr:(NSString *)endTimeStr {
|
||
[self makeRequest:@"income/incomeTotal" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, hallId, startTimeStr, endTimeStr, nil];
|
||
}
|
||
|
||
/// 家族个播收入列表
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param clanId 家族的id
|
||
/// @param startTime 开始时间
|
||
/// @param endTime 结束时间
|
||
+ (void)getClanSingleRoomIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid hallId:(NSString *)hallId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
||
[self makeRequest:@"income/singleroom/incomeTotalV2" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, uid, hallId, startTime, endTime, nil];
|
||
}
|
||
|
||
/// 公会个播收入列表
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param startTime 开始时间
|
||
/// @param endTime 结束时间
|
||
+ (void)getHallSingleRoomIncomeRecord:(HttpRequestHelperCompletion)completion uid:(NSString *)uid clanId:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
||
[self makeRequest:@"clan/income/hallMemberTotalList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid,clanId, startTime, endTime, nil];
|
||
}
|
||
|
||
/// 收入明细
|
||
/// @param completion 完成
|
||
/// @param hallId 公会的ID
|
||
/// @param memberId 查询用户的uid
|
||
/// @param uid 用户的id
|
||
/// @param startTimeStr 开始时间
|
||
/// @param endTimeStr 结束时间
|
||
+ (void)getHallIncomeDetail:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId memberId:(NSString *)memberId uid:(NSString *)uid startTimeStr:(NSString *)startTimeStr endTimeStr:(NSString *)endTimeStr {
|
||
[self makeRequest:@"income/incomeDetail" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,hallId,memberId, uid, startTimeStr, endTimeStr, nil];
|
||
}
|
||
|
||
#pragma mark - 超管
|
||
/// 获取公会超管管理房间列表
|
||
/// @param completion 完成
|
||
/// @param clanId 公会的id
|
||
/// @param uid 用户的uid
|
||
+ (void)getHallSuperAdminManagerRoomList:(HttpRequestHelperCompletion)completion clanId:(NSString *)clanId uid:(NSString *)uid {
|
||
[self makeRequest:@"hall/superManager/listHallInClan" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, clanId, uid, nil];
|
||
}
|
||
|
||
/// 超管管理公会房间
|
||
/// @param completion 完成
|
||
/// @param roomUids 管理的房间的uid
|
||
/// @param uid 用户的uid
|
||
+ (void)setSuperAdminManagerRoom:(HttpRequestHelperCompletion)completion roomUids:(NSString *)roomUids uid:(NSString *)uid {
|
||
[self makeRequest:@"hall/superManager/setSuperManage" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roomUids, uid, nil];
|
||
}
|
||
|
||
/// 获取家族超管列表
|
||
/// @param completion 完成
|
||
/// @param clanId 家族de id
|
||
+ (void)getClanSuperAdminList:(HttpRequestHelperCompletion)completion clanId:(NSString *)clanId {
|
||
[self makeRequest:@"hall/superManager/listSuperManageInClan" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, clanId, nil];
|
||
}
|
||
|
||
/// 移除超管
|
||
/// @param completion 完成
|
||
/// @param targetUid 移除的人的uid
|
||
+ (void)clanRemoveSuperAdmin:(HttpRequestHelperCompletion)completion targetUid:(NSString *)targetUid {
|
||
[self makeRequest:@"hall/superManager/remove" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, targetUid,nil];
|
||
}
|
||
|
||
|
||
/// 添加公会超管
|
||
/// @param completion 完成
|
||
/// @param uid 用户的uid
|
||
/// @param erbanNo 搜索的id
|
||
+ (void)searchGuildSuperAdmin:(HttpRequestHelperCompletion)completion uid:(NSString *)uid erbanNo:(NSString *)erbanNo {
|
||
[self makeRequest:@"hall/superManager/search" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, uid, erbanNo, nil];
|
||
}
|
||
/// 房主金币明细
|
||
/// @param completion 完成
|
||
/// @param startTime 开始时间
|
||
/// @param endTime 结束时间
|
||
+(void)getClanRoomGoldsList:(HttpRequestHelperCompletion)completion startTime:(NSString *)startTime endTime:(NSString *)endTime{
|
||
[self makeRequest:@"clanGoldFlow/hallMemberTotalList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, startTime, endTime, nil];
|
||
}
|
||
///房主获取兑换权限列表
|
||
+(void)getClanRoomMemberAuthorityList:(HttpRequestHelperCompletion)completion{
|
||
[self makeRequest:@"clan/memberExchangeAuth/list" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
|
||
}
|
||
///加入房间
|
||
+(void)requestMasterDisableRrEnablememberExchangeRights:(HttpRequestHelperCompletion)completion status:(NSString *)status targetUid:(NSString *)targetUid{
|
||
[self makeRequest:@"clan/memberExchangeAuth/operate" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__,status,targetUid,nil];
|
||
}
|
||
///获取加入房间
|
||
+(void)applyHallBtnStateWithHallId:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId{
|
||
[self makeRequest:@"hall/getApplyBtnStatus" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,hallId,nil];
|
||
}
|
||
/// 获取公会收入列表
|
||
/// @param completion 完成
|
||
/// @param hallId 公会id
|
||
/// @param startTime 查询开始时间,时间格式为yy-mm-dd
|
||
/// @param endTime 查询开始时间, 时间格式为yy-mm-dd
|
||
+(void)getGuildIncomeTotalList:(HttpRequestHelperCompletion)completion hallId:(NSString *)hallId startTime:(NSString *)startTime endTime:(NSString *)endTime{
|
||
[self makeRequest:@"income/totalList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, hallId, startTime,endTime, nil];
|
||
}
|
||
@end
|