123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // OrderItem.m
- // FirstLink
- //
- // Created by ascii on 15/6/12.
- // Copyright (c) 2015年 FirstLink. All rights reserved.
- //
- #import "OrderDetailItem.h"
- #import "FKSupplierDetailItem.h"
- @implementation OrderDetailItem
- + (NSDictionary*)mts_mapping {
- return @{@"id": mts_key(orderID),
- @"is_id_pass": mts_key(isIDPass),
- @"note": mts_key(note),
-
- @"derate_fee": mts_key(derateFee),
- @"official_postage": mts_key(officialPostage),
- @"international_postage": mts_key(internationalPostage),
- @"postage": mts_key(postage),
- @"tax_fee": mts_key(taxFee),
- @"price": mts_key(price),
- @"total_fee": mts_key(totalFee),
- @"total_price": mts_key(totalPrice),
- @"service_fee": mts_key(serviceFee),
-
- @"payment_type": mts_key(paymentType),
- @"payment_no": mts_key(paymentNO),
- @"payment_time": mts_key(paymentTime),
- @"payment_invalid_time": mts_key(paymentInvalidTime),
-
- @"status": mts_key(status),
- @"url": mts_key(webURL),
-
- @"create_time": mts_key(createTime),
- };
- }
- + (BOOL)mts_shouldSetUndefinedKeys {
- return NO;
- }
- #pragma mark - Function
- - (NSString *)realProductAllPrice {
- return [NSString stringWithFormat:@"¥%.2f", self.totalFee.floatValue / 100.0f];
- }
- - (NSString *)orderCreateTime {
- if (self.createTime && self.createTime.length > 0) {
- return [self.createTime stringByReplacingOccurrencesOfString:@"T" withString:@" "];
- }
- return @"";
- }
- - (NSString *)orderPaymentTime {
- if (self.paymentTime && self.paymentTime.length > 0) {
- return [self.paymentTime stringByReplacingOccurrencesOfString:@"T" withString:@" "];
- }
- return nil;
- }
- @end
|