修复GetAndSaveFile方法,生成的下载文件路径不正确的问题
This commit is contained in:
parent
cd93d340e2
commit
9256a564af
6
pom.xml
6
pom.xml
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<groupId>LuckyFrameClient</groupId>
|
<groupId>LuckyFrameClient</groupId>
|
||||||
<artifactId>LuckyFrameClient</artifactId>
|
<artifactId>LuckyFrameClient</artifactId>
|
||||||
<version>3.3</version>
|
<version>3.4</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>LuckyFrameClient</name>
|
<name>LuckyFrameClient</name>
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
<version>1.9.3</version>
|
<version>1.9.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-cli</groupId>
|
<groupId>commons-cli</groupId>
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-compress</artifactId>
|
<artifactId>commons-compress</artifactId>
|
||||||
<version>1.13</version>
|
<version>1.19</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-configuration</groupId>
|
<groupId>commons-configuration</groupId>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#===============================系统配置=====================================
|
#===============================系统配置=====================================
|
||||||
client.verison=3.3
|
client.verison=3.4
|
||||||
client.name=测试客户端
|
client.name=测试客户端
|
||||||
server.web.ip=localhost
|
server.web.ip=localhost
|
||||||
server.web.port=80
|
server.web.port=80
|
||||||
|
|
|
@ -8,6 +8,8 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
@ -225,7 +227,12 @@ public class InvokeMethod {
|
||||||
break;
|
break;
|
||||||
case "getandsavefile":
|
case "getandsavefile":
|
||||||
String fileSavePath = RunService.APPLICATION_HOME + "\\HTTPSaveFile\\";
|
String fileSavePath = RunService.APPLICATION_HOME + "\\HTTPSaveFile\\";
|
||||||
result = hct.sendGetAndSaveFile(packagename, params, fileSavePath, headmsg, ppt);
|
File file = new File(fileSavePath);
|
||||||
|
if (!file.exists()) {
|
||||||
|
file.mkdirs();
|
||||||
|
}
|
||||||
|
String time = DateUtil.format(DateUtil.date(), DatePattern.PURE_DATETIME_PATTERN);
|
||||||
|
result = hct.sendGetAndSaveFile(packagename, params, fileSavePath+time, headmsg, ppt);
|
||||||
break;
|
break;
|
||||||
case "httpurlget":
|
case "httpurlget":
|
||||||
result = hct.sendHttpURLGet(packagename, params, headmsg, ppt);
|
result = hct.sendHttpURLGet(packagename, params, headmsg, ppt);
|
||||||
|
|
Loading…
Reference in New Issue