Merge pull request #694 from shanaiardor/fix/tenantjob-aspect-voidretuenfail

修复由于多租户定时任务方法返回 void 导致的 xxlJob 任务执行失败的问题
This commit is contained in:
芋道源码 2024-11-09 15:10:58 +08:00 committed by GitHub
commit 9f4e94deb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ public class TenantJobAspect {
TenantUtils.execute(tenantId, () -> {
try {
Object result = joinPoint.proceed();
results.put(tenantId, StrUtil.toStringOrNull(result));
results.put(tenantId, StrUtil.toStringOrEmpty(result));
} catch (Throwable e) {
log.error("[execute][租户({}) 执行 Job 发生异常", tenantId, e);
results.put(tenantId, ExceptionUtil.getRootCauseMessage(e));