This commit is contained in:
laoyuyu
2019-12-03 19:42:37 +08:00
parent 669aa6981c
commit 3871d8f056
33 changed files with 149 additions and 86 deletions

View File

@@ -52,7 +52,7 @@ public class DbDataHelper {
* @param groupHash 组合任务Hash
* @return 实体不存在返回null
*/
public static DownloadGroupEntity getDGEntity(String groupHash) {
public static DownloadGroupEntity getDGEntityByHash(String groupHash) {
List<DGEntityWrapper> wrapper =
DbEntity.findRelationData(DGEntityWrapper.class, "DownloadGroupEntity.groupHash=?",
groupHash);
@@ -60,6 +60,20 @@ public class DbDataHelper {
return wrapper == null || wrapper.size() == 0 ? null : wrapper.get(0).groupEntity;
}
/**
* 获取组合任务实体、ftpDir任务实体
*
* @param dirPath 组合任务Hash
* @return 实体不存在返回null
*/
public static DownloadGroupEntity getDGEntityByPath(String dirPath) {
List<DGEntityWrapper> wrapper =
DbEntity.findRelationData(DGEntityWrapper.class, "DownloadGroupEntity.dirPath=?",
dirPath);
return wrapper == null || wrapper.size() == 0 ? null : wrapper.get(0).groupEntity;
}
/**
* 获取组合任务实体、ftpDir任务实体
*