Files
peko-ios/YuMi/Modules/YMMine/View/Guild/Presenter/Income/XPGuildIncomePresenter.m

87 lines
4.0 KiB
Mathematica
Raw Normal View History

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