@@ -29,12 +29,12 @@ - (instancetype)init
2929{
3030 self = [super init ];
3131 if (self) {
32- self.up_time = [[NSDate dateWithTimeIntervalSinceNow: 0 ] timeIntervalSince1970 ] * 1000 ;
32+ self.up_time = [[NSDate dateWithTimeIntervalSinceNow: 0 ] timeIntervalSince1970 ];
3333 }
3434 return self;
3535}
3636- (NSString *)toJson {
37- NSMutableDictionary *requestItemDic = [NSMutableDictionary dictionary ];
37+ NSMutableDictionary *itemDic = [NSMutableDictionary dictionary ];
3838
3939 // self class property
4040 unsigned int selfPropertyCount = 0 ;
@@ -52,12 +52,12 @@ - (NSString *)toJson {
5252 if (0 == strcmp (value, " @\" NSString\" " )) {
5353 NSString *key = [NSString stringWithCString: name encoding: NSUTF8StringEncoding];
5454 NSString *ivarValue = [self valueForKey: key];
55- if (ivarValue) [requestItemDic setValue: ivarValue forKey: key];
55+ if (ivarValue) [itemDic setValue: ivarValue forKey: key];
5656 } else {
5757 // 默认其他属性的基本类型是int
5858 NSString *key = [NSString stringWithCString: name encoding: NSUTF8StringEncoding];
5959 NSNumber *ivarValue = [self valueForKey: key];
60- if (ivarValue && ![ivarValue isEqualToNumber: @(QN_IntNotSet)]) [requestItemDic setValue: ivarValue forKey: key];
60+ if (ivarValue && ![ivarValue isEqualToNumber: @(QN_IntNotSet)]) [itemDic setValue: ivarValue forKey: key];
6161 }
6262 }
6363 }
@@ -81,12 +81,12 @@ - (NSString *)toJson {
8181 if (0 == strcmp (value, " @\" NSString\" " )) {
8282 NSString *key = [NSString stringWithCString: name encoding: NSUTF8StringEncoding];
8383 NSString *ivarValue = [self valueForKey: key];
84- if (ivarValue) [requestItemDic setValue: ivarValue forKey: key];
84+ if (ivarValue) [itemDic setValue: ivarValue forKey: key];
8585 } else {
8686 // 默认其他属性的基本类型是int
8787 NSString *key = [NSString stringWithCString: name encoding: NSUTF8StringEncoding];
8888 NSNumber *ivarValue = [self valueForKey: key];
89- if (ivarValue) [requestItemDic setValue: ivarValue forKey: key];
89+ if (ivarValue) [itemDic setValue: ivarValue forKey: key];
9090 }
9191 }
9292 }
@@ -95,10 +95,10 @@ - (NSString *)toJson {
9595 free (superProperties);
9696
9797 NSError *error;
98- NSData *requestItemData = [NSJSONSerialization dataWithJSONObject: requestItemDic options: NSJSONWritingPrettyPrinted error: &error];
98+ NSData *itemData = [NSJSONSerialization dataWithJSONObject: itemDic options: kNilOptions error: &error];
9999 if (error) return nil ;
100- NSString *requestItemJson = [[NSString alloc ] initWithData: requestItemData encoding: NSUTF8StringEncoding];
101- return requestItemJson ;
100+ NSString *itemJson = [[NSString alloc ] initWithData: itemData encoding: NSUTF8StringEncoding];
101+ return itemJson ;
102102}
103103@end
104104
@@ -398,7 +398,7 @@ @interface QNUploadInfoReporter ()
398398@property (nonatomic , strong ) NSString *recorderFilePath;
399399@property (nonatomic , strong ) dispatch_queue_t recordQueue;
400400@property (nonatomic , strong ) dispatch_semaphore_t semaphore;
401- @property (nonatomic , copy ) NSString *X_Log_Client_Id;
401+ @property (nonatomic , copy , readwrite ) NSString *X_Log_Client_Id;
402402
403403@end
404404
0 commit comments