Parcourir la source

[bug]清理缓存勾选了清除上传/下载/备份完成及失败的记录,上传失败记录未清除

huangxiaodong il y a 1 an
Parent
commit
5048385f97

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

@@ -1009,7 +1009,8 @@
     
     //下载完成
     NSMutableString* where = [[NSMutableString alloc] initWithString:@"where "];
-    NSString *curStr =  [NSString stringWithFormat:@"%@=%@ ",bg_sqlKey(@"curDownloadStateType"),bg_sqlValue([NSNumber numberWithInt:downloadStateDone])];
+    NSString *curStr =  [NSString stringWithFormat:@"%@=%@ || %@=%@ ",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) {
@@ -1017,7 +1018,8 @@
     
     //上传完成
     NSMutableString* where2 = [[NSMutableString alloc] initWithString:@"where "];
-    NSString *curStr2 =  [NSString stringWithFormat:@"%@=%@ ",bg_sqlKey(@"curUploadStateType"),bg_sqlValue([NSNumber numberWithInt:uploadStateDone])];
+    NSString *curStr2 =  [NSString stringWithFormat:@"%@=%@ || %@=%@ ",bg_sqlKey(@"curUploadStateType"),bg_sqlValue([NSNumber numberWithInt:uploadStateDone]),
+                          bg_sqlKey(@"curUploadStateType"),bg_sqlValue([NSNumber numberWithInt:uploadStateFail])];
     [where2 appendString:curStr2];
     
     [uploadFileDataModel bg_deleteAsync:upLoadFile_image_tableName where:where2 complete:^(BOOL isSuccess) {