From db1b408d60e2f4d0c48bc875a09ab4c8a2975367 Mon Sep 17 00:00:00 2001
From: ChenJiaHe <763432473@qq.com>
Date: 星期六, 05 三月 2022 14:45:39 +0800
Subject: [PATCH] 新增文件导出工具方法-流模式

---
 src/main/java/com/hx/util/ImagesAddDomain.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/hx/util/ImagesAddDomain.java b/src/main/java/com/hx/util/ImagesAddDomain.java
index cfbfe27..8a7f0be 100644
--- a/src/main/java/com/hx/util/ImagesAddDomain.java
+++ b/src/main/java/com/hx/util/ImagesAddDomain.java
@@ -19,7 +19,7 @@
         if(SimpleTool.checkNotNull(arrString)){
             JSONArray images = JSONArray.fromObject(arrString);
             for(int i = 0;i<images.size();i++){
-                if(images.getString(i).indexOf("http")!=-1){
+                if(images.getString(i).startsWith("http")){
                     arr.add(images.getString(i));
                 }else{
                     arr.add(urlAddDomain(images.getString(i),domainName));
@@ -39,7 +39,7 @@
         JSONArray arr = new JSONArray();
         if(SimpleTool.checkNotNull(imagesArr)){
             for(int i = 0;i<imagesArr.size();i++){
-                if(imagesArr.getString(i).indexOf("http")!=-1){
+                if(imagesArr.getString(i).startsWith("http")){
                     arr.add(imagesArr.getString(i));
                 }else{
                     arr.add(urlAddDomain(imagesArr.getString(i),domainName));
@@ -60,7 +60,7 @@
             return imagesUrl;
         }
         if(SimpleTool.checkNotNull(imagesUrl)){
-            if(imagesUrl.indexOf("http")!=-1){
+            if(imagesUrl.startsWith("http")){
                 return imagesUrl;
             }
             if(domainName.endsWith("/")){

--
Gitblit v1.8.0