From 6e1c2b9a57648f006bfe4445836cb7ec655b2850 Mon Sep 17 00:00:00 2001 From: gallonyin Date: Sat, 19 Aug 2023 22:38:50 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E8=BD=AC=E5=8F=91?= =?UTF-8?q?=E9=87=8D=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../worktool/service/WeworkOperationImpl.kt | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt b/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt index b874be3..d989542 100644 --- a/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt +++ b/app/src/main/java/org/yameida/worktool/service/WeworkOperationImpl.kt @@ -200,6 +200,7 @@ object WeworkOperationImpl { } else { LogUtils.d("$title: 转发失败 $originalContent") uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$title: 转发失败 $originalContent", startTime, listOf(), titleList) + goHome() return false } } else { @@ -224,6 +225,7 @@ object WeworkOperationImpl { } else { LogUtils.d("$title: 转发失败 $originalContent") uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$title: 转发失败 $originalContent", startTime, listOf(), titleList) + goHome() return false } } else { @@ -476,9 +478,11 @@ object WeworkOperationImpl { } else { LogUtils.e("微盘文件转发失败: $objectName") if (retryCount > 0) { + goHome() return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1) } uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "微盘文件转发失败: $objectName", startTime, listOf(), titleList) + goHome() return false } } else { @@ -541,6 +545,7 @@ object WeworkOperationImpl { } else { LogUtils.e("微盘文件转发失败: $objectName") uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "微盘文件转发失败: $objectName", startTime, listOf(), titleList) + goHome() return false } } else { @@ -589,9 +594,11 @@ object WeworkOperationImpl { } else { LogUtils.e("转发失败") if (retryCount > 0) { - return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1) + goHome() + return pushMicroprogram(message, titleList, objectName, receivedContent, originalContent, fileUrl, extraText, retryCount - 1) } uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "转发失败: $objectName", startTime, listOf(), titleList) + goHome() return false } } else { @@ -644,6 +651,7 @@ object WeworkOperationImpl { } else { LogUtils.e("微盘文件转发失败: $objectName") uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "微盘文件转发失败: $objectName", startTime, listOf(), titleList) + goHome() return false } } else { @@ -737,9 +745,11 @@ object WeworkOperationImpl { } else { LogUtils.e("文件转发失败: $objectName") if (retryCount > 0) { + goHome() return pushFile(message, titleList, objectName, fileUrl, fileBase64, fileType, extraText, retryCount - 1) } uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "文件转发失败: $objectName", startTime, listOf(), titleList) + goHome() return false } } else { @@ -805,9 +815,11 @@ object WeworkOperationImpl { } else { LogUtils.e("文件转发失败: $objectName") if (retryCount > 0) { + goHome() return pushFile(message, titleList, objectName, fileUrl, fileBase64, fileType, extraText, retryCount - 1) } uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "文件转发失败: $objectName", startTime, listOf(), titleList) + goHome() return false } } else { @@ -857,9 +869,11 @@ object WeworkOperationImpl { } else { LogUtils.e("转发失败") if (retryCount > 0) { - return pushMicroDiskImage(message, titleList, objectName, extraText, retryCount - 1) + goHome() + return pushLink(message, titleList, objectName, receivedContent, originalContent, fileUrl, extraText, retryCount - 1) } uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "转发失败: $objectName", startTime, listOf(), titleList) + goHome() return false } } else { @@ -1085,6 +1099,7 @@ object WeworkOperationImpl { } else { LogUtils.e("$groupName: 转发失败") uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$groupName: 转发失败", startTime, listOf(), titleList) + goHome() return false } } else { @@ -1217,6 +1232,7 @@ object WeworkOperationImpl { } else { LogUtils.e("$title: 转发失败") uploadCommandResult(message, ExecCallbackBean.ERROR_RELAY, "$title: 转发失败", startTime, listOf(), titleList) + goHome() return false } } else { @@ -1597,6 +1613,7 @@ object WeworkOperationImpl { } else { LogUtils.e("未找到保存并发送按钮") uploadCommandResult(message, ExecCallbackBean.ERROR_BUTTON, "未找到保存并发送按钮", startTime, listOf(), titleList) + goHome() return false } } else {