Parcourir la source

1.【IOS】清理缓存勾选了清除上传/下载/备份完成及失败的记录,上传失败记录未清除

huangxiaodong il y a 1 an
Parent
commit
9612870ddb

+ 2 - 4
创维盒子/双子星云手机/Class/Set/MySetViewController.m

@@ -1009,16 +1009,14 @@
     
     //下载完成
     NSMutableString* where = [[NSMutableString alloc] initWithString:@"where "];
-    NSString *curStr =  [NSString stringWithFormat:@"%@=%@ || %@=%@ ",bg_sqlKey(@"curDownloadStateType"),bg_sqlValue([NSNumber numberWithInt:downloadStateDone])
-                         ,bg_sqlKey(@"curDownloadStateType"),bg_sqlValue([NSNumber numberWithInt:downloadStateFail])];
+    NSString *curStr =  [NSString stringWithFormat:@"%@=%@ or %@=%@ ",bg_sqlKey(@"curDownloadStateType"),bg_sqlValue([NSNumber numberWithInt:downloadStateDone]),bg_sqlKey(@"curDownloadStateType"),bg_sqlValue([NSNumber numberWithInt:downloadStateFail])];
     [where appendString:curStr];
-    
     [couldPhoneFileModel bg_deleteAsync:download_tableName where:where complete:^(BOOL isSuccess) {
     }];
     
     //上传完成
     NSMutableString* where2 = [[NSMutableString alloc] initWithString:@"where "];
-    NSString *curStr2 =  [NSString stringWithFormat:@"%@=%@ || %@=%@ ",bg_sqlKey(@"curUploadStateType"),bg_sqlValue([NSNumber numberWithInt:uploadStateDone]),
+    NSString *curStr2 =  [NSString stringWithFormat:@"%@=%@ or %@=%@ ",bg_sqlKey(@"curUploadStateType"),bg_sqlValue([NSNumber numberWithInt:uploadStateDone]),
                           bg_sqlKey(@"curUploadStateType"),bg_sqlValue([NSNumber numberWithInt:uploadStateFail])];
     [where2 appendString:curStr2];