添加文件名适配器接口,修复group中useServerFileName未同步到子task的问题

This commit is contained in:
DaveBoy1994
2020-02-18 10:01:10 +08:00
parent e015c2a2f7
commit 63ec23f241
8 changed files with 84 additions and 6 deletions

View File

@@ -105,7 +105,11 @@ public class DbDataHelper {
entity.setUrl(url);
entity.setFilePath(groupHash + "_" + i);
int lastIndex = url.lastIndexOf(File.separator);
entity.setFileName(url.substring(lastIndex + 1));
//去除url末尾携带的的参数
int endIndex = url.lastIndexOf("?");
if(endIndex<0)endIndex=url.length();
entity.setFileName(url.substring(lastIndex + 1,endIndex));
entity.setGroupHash(groupHash);
entity.setGroupChild(true);
list.add(entity);