Няма описание

FKDynamicMessageItem.m 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // FKDynamicMessageItem.m
  3. // FirstLink
  4. //
  5. // Created by jack on 16/7/12.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKDynamicMessageItem.h"
  9. @implementation FKDynamicMessageItem
  10. + (NSDictionary*)mts_mapping {
  11. return @{
  12. @"new_person_config.pic_url": mts_key(freshPic),
  13. @"new_person_config.target_url": mts_key(targetURL),
  14. @"preferential_message": mts_key(message),
  15. @"invite": mts_key(inviteMsgArray),
  16. };
  17. }
  18. + (BOOL)mts_shouldSetUndefinedKeys {
  19. return NO;
  20. }
  21. - (NSString *)combinedInviteMsg{
  22. if (!self.inviteMsgArray.count) return nil;
  23. NSString *resStr = nil;
  24. for (NSString *string in self.inviteMsgArray) {
  25. if ([string isKindOfClass:[NSString class]]){
  26. if (!resStr) {
  27. resStr = string;
  28. }else{
  29. resStr = [resStr stringByAppendingString:[NSString stringWithFormat:@"\n\n%@", string]];
  30. }
  31. }
  32. }
  33. return resStr;
  34. }
  35. @end