From adca98ba944374e7e619beeebe97607f3f33572b Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Mon, 26 Jul 2021 16:43:14 +0800
Subject: [PATCH] 1.用户添加派遣字段,派遣记录

---
 src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
index d679d2a..3563248 100644
--- a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
+++ b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -28,6 +28,7 @@
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
+import org.springblade.common.utils.arg;
 import org.springblade.core.launch.constant.AppConstant;
 import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.oss.model.OssFile;
@@ -224,23 +225,10 @@
 		attach.setDeptid(deptid);
 		attach.setType(type);
 		attachService.save(attach);
-		test01("http://192.168.0.104:80/blade-resource/attach/save",attach);
+		arg.test01(arg.url+"/blade-resource/attach/save",attach);
 		return attach.getId();
 	}
 
-	public static String test01(String path,Object obj) throws Exception{
-		CloseableHttpClient httpClient = HttpClients.createDefault();
-		HttpPost httpPost = new HttpPost(path);
-		httpPost.setEntity(new StringEntity(JSON.toJSONString(obj),
-			ContentType.create("application/json", "UTF-8")));
-		CloseableHttpResponse execute = httpClient.execute(httpPost);
-		HttpEntity entity = execute.getEntity();
-		String str = EntityUtils.toString(entity);
-		httpPost.clone();
-		httpClient.close();
-		System.out.println(str);
-		return str;
-	}
 	/**
 	 * 删除文件
 	 *

--
Gitblit v1.9.3