租移动

This commit is contained in:
2026-08-21 09:47:45 +08:00
parent d923649a8d
commit c0dd74318c
9 changed files with 146 additions and 10 deletions
@@ -110,7 +110,7 @@ public class SysOperationLogServiceImpl implements ISysOperationLogService {
/**
* 重试:按记录的 classMethod + requestParams 反射重放原始 Controller 操作。
* 说明:
* - 仅允许 statusCode != 200(失败)的记录重试;
* - 仅允许 statusCode != 0(失败)的记录重试;
* - 仅支持入参为 JSON 数组形式(POST body / @RequestBody)。GET query 串无法可靠重建,直接拒绝;
* - 经 Spring 代理调用,会再次走 SysOperationLogAspect 切面、生成一条新的审计日志;
* - 重放前还原原操作人上下文(UserContext),使新审计日志记录正确的操作人;
@@ -121,8 +121,8 @@ public class SysOperationLogServiceImpl implements ISysOperationLogService {
public Object retry(Long id) {
SysOperationLog e = getById(id);
if (e == null) throw new DException("审计日志不存在(id=" + id + ")");
if (e.getStatusCode() != null && e.getStatusCode() == 200) {
throw new DException("该操作已成功(statusCode=200),无需重试");
if (e.getStatusCode() != null && e.getStatusCode() == 0) {
throw new DException("该操作已成功(statusCode=0),无需重试");
}
// 多校隔离:不允许重试其他学校的操作日志
if (e.getSchId() != null && UserContext.getSchId() != null