2023-07-14 18:50:55 +08:00
|
|
|
|
//
|
|
|
|
|
// XPGuildIncomePresenter.m
|
|
|
|
|
// YuMi
|
|
|
|
|
//
|
|
|
|
|
// Created by YuMi on 2022/4/11.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#import "XPGuildIncomePresenter.h"
|
|
|
|
|
#import "Api+Guild.h"
|
|
|
|
|
#import "AccountInfoStorage.h"
|
|
|
|
|
#import "GuildIncomeRecordModel.h"
|
|
|
|
|
#import "GuildPersonIncomeRecordModel.h"
|
|
|
|
|
#import "XPGuildIncomeProtocol.h"
|
2023-08-08 11:26:07 +08:00
|
|
|
|
#import "XPMineGuildPersonalBillRecordModel.h"
|
2023-07-14 18:50:55 +08:00
|
|
|
|
|
|
|
|
|
@implementation XPGuildIncomePresenter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// 获取家族所有的收入记录
|
|
|
|
|
/// @param clanId 家族的id
|
|
|
|
|
/// @param startTime 开始时间
|
|
|
|
|
/// @param endTime 结束时间
|
|
|
|
|
- (void)getClanTotalIncome:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
|
|
|
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
|
|
|
[Api getClanIncomeRecord:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
|
|
|
GuildIncomeRecordModel * incomeModel = [GuildIncomeRecordModel modelWithDictionary:data.data];
|
|
|
|
|
[[self getView] getClanTotalIncomeScuess:incomeModel];
|
|
|
|
|
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
|
|
|
|
[[self getView] getClanTotalIncomeFail:msg];
|
|
|
|
|
}] uid:uid clanId:clanId startTime:startTime endTime:endTime];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 获取公会所有的收入记录
|
|
|
|
|
/// @param hallId 公会的id
|
|
|
|
|
/// @param startTime 开始时间
|
|
|
|
|
/// @param endTime 结束时间
|
|
|
|
|
- (void)getHallTotalIncome:(NSString *)hallId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
|
|
|
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
|
|
|
[Api getGuildIncomeRecord:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
|
|
|
GuildPersonIncomeRecordModel * incomeModel = [GuildPersonIncomeRecordModel modelWithDictionary:data.data];
|
|
|
|
|
[[self getView] getHallTotalIncomeScuess:incomeModel];
|
|
|
|
|
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
|
|
|
|
[[self getView] getHallTotalIncomeFail:msg];
|
|
|
|
|
}] uid:uid hallId:hallId startTimeStr:startTime endTimeStr:endTime];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 获取家族所有个播的收入记录
|
|
|
|
|
/// @param clanId 家族的id
|
|
|
|
|
/// @param startTime 开始时间
|
|
|
|
|
/// @param endTime 结束时间
|
|
|
|
|
- (void)getClanAnchorTotalIncome:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
|
|
|
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
|
|
|
[Api getClanSingleRoomIncomeRecord:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
|
|
|
GuildPersonIncomeRecordModel * incomeModel = [GuildPersonIncomeRecordModel modelWithDictionary:data.data];
|
|
|
|
|
[[self getView] getClanAnchorTotalIncomeSuccess:incomeModel];
|
|
|
|
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
|
|
|
|
[[self getView] getClanAnchorTotalIncomeFail:msg];
|
2024-02-23 14:40:10 +08:00
|
|
|
|
}] uid:uid hallId:clanId startTime:startTime endTime:endTime];
|
2023-07-14 18:50:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// 获取公会所有个播的收入记录
|
|
|
|
|
/// @param clanId 家族的id
|
|
|
|
|
/// @param startTime 开始时间
|
|
|
|
|
/// @param endTime 结束时间
|
|
|
|
|
- (void)getHallAnchorTotalIncome:(NSString *)clanId startTime:(NSString *)startTime endTime:(NSString *)endTime {
|
|
|
|
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
|
|
|
[Api getHallSingleRoomIncomeRecord:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
|
|
|
GuildPersonIncomeRecordModel * incomeModel = [GuildPersonIncomeRecordModel modelWithDictionary:data.data];
|
|
|
|
|
[[self getView] getHallAnchorTotalIncomeSuccess:incomeModel];
|
|
|
|
|
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
|
|
|
|
[[self getView] getHallAnchorTotalIncomeFail:msg];
|
|
|
|
|
}] uid:uid clanId:clanId startTime:startTime endTime:endTime];
|
|
|
|
|
}
|
2023-08-08 11:26:07 +08:00
|
|
|
|
/// 获取公会收入列表
|
|
|
|
|
/// @param hallId 公会id
|
|
|
|
|
/// @param startTime 查询开始时间,时间格式为yy-mm-dd
|
|
|
|
|
/// @param endTime 查询开始时间, 时间格式为yy-mm-dd
|
|
|
|
|
-(void)getGuildIncomeTotalListWithhallId:(NSString *)hallId startTime:(NSString *)startTime endTime:(NSString *)endTime{
|
|
|
|
|
[Api getGuildIncomeTotalList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
|
|
|
XPMineGuildPersonalBillRecordModel *model = [XPMineGuildPersonalBillRecordModel modelWithDictionary:data.data];
|
|
|
|
|
[[self getView]getGuildIncomeTotalListSuccess:model];
|
|
|
|
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
|
|
|
|
|
|
|
|
|
} showLoading:YES errorToast:YES] hallId:hallId startTime:startTime endTime:endTime];
|
|
|
|
|
}
|
2023-07-14 18:50:55 +08:00
|
|
|
|
@end
|