Нет описания

FKHotProductItem.m 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // FKRecommendItem.m
  3. // FirstLink
  4. //
  5. // Created by jack on 15/12/8.
  6. // Copyright © 2015年 FirstLink. All rights reserved.
  7. //
  8. #import "FKHotProductItem.h"
  9. @implementation FKHotProductItem
  10. + (NSDictionary*)mts_mapping {
  11. return @{@"product_id": mts_key(itemID),
  12. @"id": mts_key(recoItemID),
  13. @"user_id": mts_key(userID),
  14. @"first_pic": mts_key(picUrl),
  15. @"mark_pic": mts_key(markPicUrl),
  16. @"title": mts_key(title),
  17. @"brand_name": mts_key(brandName),
  18. @"price": mts_key(price),
  19. @"original_price": mts_key(oringalPrice),
  20. @"supplier_pic": mts_key(supplierPicUrl),
  21. @"sales_count": mts_key(salesCount),
  22. @"status": mts_key(status),
  23. };
  24. }
  25. + (BOOL)mts_shouldSetUndefinedKeys {
  26. return NO;
  27. }
  28. - (NSAttributedString *)priceAttributedString {
  29. NSString *price = self.price ? [NSString stringWithFormat:@"¥%d ", [[FLStringHelper convertFenToYuan:self.price] intValue]] : nil;
  30. NSString *originalPrice = self.oringalPrice ? [NSString stringWithFormat:@"¥%d", [[FLStringHelper convertFenToYuan:self.oringalPrice] intValue]] : nil;
  31. NSAttributedString *attributeString = [FLStringHelper attStringWithText:price
  32. color:UIColorFromRGB(0xff624a)
  33. font:[UIFont systemFontOfSize:14]
  34. subText:originalPrice
  35. subColor:UIColorFromRGB(0x999999)
  36. subFont:[UIFont systemFontOfSize:10]];
  37. return attributeString;
  38. }
  39. @end