Explorar o código

企业logo数据不一致

dengsixing hai 1 ano
pai
achega
ae9267e892

+ 10 - 1
src/main/java/com/fdkankan/contro/service/impl/CommonServiceImpl.java

@@ -461,7 +461,11 @@ public class CommonServiceImpl implements ICommonService {
             String localLogoPath = null;
             if (StrUtil.isNotEmpty(company.getTopLogo())) {
                 localLogoPath = ConstantFilePath.AGENT_PATH + company.getTopLogo().substring(company.getTopLogo().lastIndexOf("//") + 1);
-                HttpUtil.downloadFile(company.getTopLogo(), localLogoPath);
+                if(company.getTopLogo().startsWith("http")){
+                    HttpUtil.downloadFile(company.getTopLogo(), localLogoPath);
+                }else{
+                    fYunFileServiceInterface.downloadFile(company.getTopLogo().substring(1), localLogoPath);
+                }
                 fYunFileServiceInterface.uploadFile(localLogoPath, userViewPath + "loadingLogo-user.png");
                 fYunFileServiceInterface.uploadFile(localLogoPath, userEditPath + "loadingLogo-user.png");
                 sceneJson.setLoadingLogo("user");
@@ -470,6 +474,11 @@ public class CommonServiceImpl implements ICommonService {
                 sceneEditInfo.setLoadingLogoFile("loadingLogo-user.png");
             }
             if (StrUtil.isNotEmpty(company.getFloorLogo())) {
+                if(company.getFloorLogo().startsWith("http")){
+                    HttpUtil.downloadFile(company.getFloorLogo(), localLogoPath);
+                }else{
+                    fYunFileServiceInterface.downloadFile(company.getFloorLogo().substring(1), localLogoPath);
+                }
                 localLogoPath = ConstantFilePath.AGENT_PATH + company.getFloorLogo().substring(company.getFloorLogo().lastIndexOf("//") + 1);
                 HttpUtil.downloadFile(company.getFloorLogo(), localLogoPath);
                 fYunFileServiceInterface.uploadFile(localLogoPath, userViewPath + "floorLogo-user.png");