123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // FKDynamicMessageItem.m
- // FirstLink
- //
- // Created by jack on 16/7/12.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKDynamicMessageItem.h"
- @implementation FKDynamicMessageItem
- + (NSDictionary*)mts_mapping {
- return @{
- @"new_person_config.pic_url": mts_key(freshPic),
- @"new_person_config.target_url": mts_key(targetURL),
- @"preferential_message": mts_key(message),
- @"invite": mts_key(inviteMsgArray),
- };
- }
- + (BOOL)mts_shouldSetUndefinedKeys {
- return NO;
- }
- - (NSString *)combinedInviteMsg{
- if (!self.inviteMsgArray.count) return nil;
-
- NSString *resStr = nil;
- for (NSString *string in self.inviteMsgArray) {
- if ([string isKindOfClass:[NSString class]]){
- if (!resStr) {
- resStr = string;
- }else{
- resStr = [resStr stringByAppendingString:[NSString stringWithFormat:@"\n\n%@", string]];
- }
- }
- }
- return resStr;
- }
- @end
|