// // XPRoomTopicPresenter.m // xplan-ios // // Created by 冯硕 on 2022/3/14. // #import "XPRoomTopicPresenter.h" #import "XPConstant.h" #import "DESEncrypt.h" #import "AccountInfoStorage.h" #import "Api+RoomSetting.h" #import "XPRoomTopicProtocol.h" #import "RoomInfoModel.h" @implementation XPRoomTopicPresenter ///更新房间信息 - (void)roomTopicUpdate:(NSString *)roomDesc introduction:(NSString *)introduction roomInfo:(RoomInfoModel *)roomInfo { NSString * uid = [AccountInfoStorage instance].getUid; NSString * ticket = [AccountInfoStorage instance].getTicket; NSMutableDictionary * params = [NSMutableDictionary dictionary]; [params setObject:ticket forKey:@"ticket"]; [params setObject:uid forKey:@"uid"]; [params setObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"]; if (roomInfo.title.length > 0) { [params setObject:roomInfo.title forKey:@"title"]; } if (roomInfo.roomPwd.length > 0) { [params setObject:roomInfo.roomPwd forKey:@"roomPwd"]; } if (roomInfo.tagId > 0) { [params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"]; } [params setValue:roomDesc forKey:@"roomDesc"]; if (introduction.length > 0) { [params setValue:introduction forKey:@"introduction"]; } [params setObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"]; [Api ownerUpdateRoomInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [[self getView] updateRoomTopicSuccess]; } showLoading:YES] params:params]; } @end