瀏覽代碼

上传优化

guilin 1 月之前
父節點
當前提交
2769ae295d

+ 1 - 3
app/src/main/java/com/fxy/common/AsyncFileUpload.java

@@ -375,9 +375,7 @@ public class AsyncFileUpload {
             if (myObject.getIsFinish() != 3){
                 myObject.setIsFinish( status == 1 ? 3 : 2);
             }
-            if (status == 1){
-                myObject.setOssUrl(photoPath);
-            }else{
+            if (status == 0){
                 myObject.setRePush(myObject.getRePush()+1);
             }
 

+ 6 - 4
app/src/main/java/com/fxy/common/AsyncPictureUpload.java

@@ -403,6 +403,10 @@ public class AsyncPictureUpload {
             awaitUploadList.addAll(realmResults);
         }
 
+        //@todo
+        if (awaitUploadList.size()==0){
+            tmpData();
+        }
 
 
         if (awaitUploadList.size()>0){
@@ -415,7 +419,7 @@ public class AsyncPictureUpload {
         if (awaitUploadList.size()==0 && debug){
 
             HashMap<String,String> mapUrl= new HashMap<>();
-            mapUrl.put("dd31ae2f-dd02-46b2-bfdb-eb721ea11066","/prod/fxy/android/detection/20240923/d3e5552e-344c-4c74-be91-468cbb22f22c.JPEG");
+            mapUrl.put("7427cf45-8c73-4b59-96b9-7d5eb9b4d558","/prod/fxy/android/detection/20240923/39284eae-b033-4e7d-a17c-e85c43931b6c.JPEG");
 
             // 使用entrySet()遍历
             for (Map.Entry<String, String> entry : mapUrl.entrySet()) {
@@ -574,9 +578,7 @@ public class AsyncPictureUpload {
             if (myObject.getIsFinish() != 3){
                 myObject.setIsFinish( status == 1 ? 3 : 2);
             }
-            if (status == 1){
-                myObject.setOssUrl(photoPath);
-            }else{
+            if (status == 0){
                 myObject.setRePush(myObject.getRePush()+1);
             }
             mRealm.commitTransaction();