Commit eb03882f authored by 井庆林's avatar 井庆林

code review

parent fef3d62e
......@@ -409,9 +409,8 @@ static NewPhobos *_sharedClient;
NSDictionary *dataDict = [_sharedClient prepareDictionaryForEvent:eventName attributes:attributes];
@try {
NSData *JSON = [PhobosUtil encodeJSON:dataDict];
[PhobosDataManager insertData:dataDict sendAPI:currentAPI completion:^(BOOL contextDidSave, NSError * _Nullable error) {
[self disposeSendDataWithImmediately:sendNow];
}];
[PhobosDataManager insertData:dataDict sendAPI:currentAPI];
[self disposeSendDataWithImmediately:sendNow];
} @catch (NSException *exception) {
NSAssert(NO, @"哎呀呀,VALUE不能为NSObject ");
}
......@@ -426,9 +425,8 @@ static NewPhobos *_sharedClient;
[PhobosDataManager updateDataEntities:entities sendStatus:PhobosDataSendStatusSending];
[PhobosSendManager sendDataWithEntities:entities completion:^(NSArray<PhobosSendDataEntity *> * _Nonnull finishEntities, NSInteger code) {
if (code == 200) {
[PhobosDataManager updateDataEntities:finishEntities sendStatus:PhobosDataSendStatusFinish completion:^(BOOL contextDidSave, NSError * _Nullable error) {
[PhobosDataManager deleteDataEntities:finishEntities];
}];
[PhobosDataManager updateDataEntities:finishEntities sendStatus:PhobosDataSendStatusFinish];
[PhobosDataManager deleteDataEntities:finishEntities];
} else {
[PhobosDataManager updateDataEntities:finishEntities sendStatus:PhobosDataSendStatusError];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment