This commit is contained in:
2026-08-19 18:21:00 +08:00
parent ea9fde7979
commit 3b0e5190c3
3 changed files with 24 additions and 21 deletions
@@ -51,7 +51,6 @@ public class SyncLogAspect {
// 大类:Send / Sync(由 key 前缀推导)
boolean isSend = dataType.getKey() != null && dataType.getKey().startsWith("Send");
entity.setSyncType(isSend ? "Send" : "Sync");
entity.setSyncTypeKey(isSend ? "Send" : "Sync");
entity.setSyncTypeName(isSend ? "推送" : "同步");
entity.setClassMethod(classMethod);
@@ -67,9 +66,11 @@ public class SyncLogAspect {
result = pjp.proceed();
} catch (Throwable t) {
entity.setErrorMsg(truncate(t.getMessage(), MAX_ERROR_MSG));
entity.setStatus(0);
syncLogService.saveAsync(entity);
throw t;
}
entity.setStatus(1);
syncLogService.saveAsync(entity);
return result;
}