From 3ef508b2d3a90b795d718146d89a4e3836b1343b Mon Sep 17 00:00:00 2001 From: bynt <13586541001@163.com> Date: Mon, 13 Nov 2023 14:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E6=AD=A5=E6=96=B9=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../baiye/module/service/impl/DmpCallbackServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/DmpCallbackServiceImpl.java b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/DmpCallbackServiceImpl.java index 8778f6f4..056a13ec 100644 --- a/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/DmpCallbackServiceImpl.java +++ b/ad-platform-services/ad-platform-source/src/main/java/com/baiye/module/service/impl/DmpCallbackServiceImpl.java @@ -122,9 +122,11 @@ public class DmpCallbackServiceImpl implements DmpCallbackService { // 异步方式下载 List finalResponseList = responseList; CompletableFuture.runAsync(() -> downResource(bathNo, byTaskName, originalList, finalResponseList)); + deliveryRecordService.updateStatusByTaskName(DefaultNumberConstants.ONE_NUMBER, finalResponseList.size(), bathNo); } if (byTaskName.getType() == DefaultNumberConstants.FOUR_NUMBER) { CompletableFuture.runAsync(() -> downReceptionResource(bathNo, byTaskName, originalList)); + deliveryRecordService.updateStatusByTaskName(DefaultNumberConstants.ONE_NUMBER, originalList.size(), bathNo); } } // 兑换结果失败也将结果返回 @@ -197,7 +199,6 @@ public class DmpCallbackServiceImpl implements DmpCallbackService { FileZipUtil.writeToCsv(csvList, parseFile.getPath(), Boolean.TRUE); // 设置压缩文件 CompressUtil.decryptionCompression(path, parseFile.getPath(), null); - deliveryRecordService.updateStatusByTaskName(DefaultNumberConstants.ONE_NUMBER, responseList.size(), taskName); FileUtil.del(unzipPath); return; } @@ -218,7 +219,6 @@ public class DmpCallbackServiceImpl implements DmpCallbackService { FileUtil.del(csvPath); String downUrl = deliveryProperties.getDmpDownPath().concat(filePath); deliveryRecordClient.updatePath(zipPath, downUrl, byTaskName.getDownId(), SecurityConstants.FROM_IN); - deliveryRecordService.updateStatusByTaskName(DefaultNumberConstants.ONE_NUMBER, responseList.size(), taskName); redisUtils.set(CacheKey.DMP_DOWN_URL.concat(String.valueOf(byTaskName.getDownId())), zipPath, DefaultNumberConstants.ONE_NUMBER, TimeUnit.DAYS); } @@ -250,7 +250,7 @@ public class DmpCallbackServiceImpl implements DmpCallbackService { Integer.parseInt(downNum.toString()) + strings.size() : strings.size(); // 设置压缩文件 CompressUtil.decryptionCompression(path, parseFile.getPath(), null); - deliveryRecordService.updateStatusByTaskName(DefaultNumberConstants.ONE_NUMBER, originalList.size(), bathNo); + deliveryRecordClient.updateOriginAndSize(byTaskName.getUserId(), format, size, SecurityConstants.FROM_IN); redisUtils.set(CacheKey.DMP_TRIPARTITE_NUM.concat(format), size, DefaultNumberConstants.ONE_NUMBER, TimeUnit.DAYS); FileUtil.del(unzipPath); @@ -272,7 +272,6 @@ public class DmpCallbackServiceImpl implements DmpCallbackService { (zipPath.lastIndexOf(StrPool.SLASH) + DefaultNumberConstants.ONE_NUMBER); FileUtil.del(csvPath); String downUrl = deliveryProperties.getDmpDownPath().concat(filePath); - deliveryRecordService.updateStatusByTaskName(DefaultNumberConstants.ONE_NUMBER, stringSet.size(), bathNo); deliveryRecordClient.savePathAndSetDateStr(byTaskName.getUserId(), stringSet.size(), zipPath, downUrl, format, SecurityConstants.FROM_IN); redisUtils.set(CacheKey.DMP_TRIPARTITE_URL.concat(format), zipPath, DefaultNumberConstants.ONE_NUMBER, TimeUnit.DAYS); redisUtils.set(CacheKey.DMP_TRIPARTITE_NUM.concat(format), originalList.size(), DefaultNumberConstants.ONE_NUMBER, TimeUnit.DAYS);