下载优化

This commit is contained in:
xy
2024-09-18 20:50:33 +08:00
parent 06c8ce2e29
commit 32520907d2
2 changed files with 5 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ public class AskDeviceDataServiceImpl implements AskDeviceDataService {
@Override
public boolean downloadFile(String nDid, String name, Integer size, String fileCheck) {
boolean result = true;
boolean result = false;
try {
redisUtil.saveByKeyWithExpire("fileDowning:"+nDid,"fileDowning",300L);
redisUtil.saveByKeyWithExpire("fileCheck"+name,fileCheck,300L);
@@ -104,9 +104,8 @@ public class AskDeviceDataServiceImpl implements AskDeviceDataService {
Thread.sleep(2000);
Object object2 = redisUtil.getObjectByKey("downloadFilePath:"+name);
if (!Objects.isNull(object2)) {
result = true;
break;
} else {
result = false;
}
}
mid = mid + 1;