|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
package com.supervision.police.dto;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.supervision.police.domain.AuditLog;
|
|
|
|
|
import com.supervision.police.dto.user.UserInfoDTO;
|
|
|
|
|
import com.supervision.utils.UserUtil;
|
|
|
|
@ -102,7 +103,11 @@ public class AuditLogDTO implements Serializable {
|
|
|
|
|
}
|
|
|
|
|
this.url = request.getRequestURI();
|
|
|
|
|
this.method = request.getMethod();
|
|
|
|
|
this.ip = request.getRemoteAddr();
|
|
|
|
|
if (StrUtil.isNotBlank(request.getHeader("X-Real-IP"))){
|
|
|
|
|
this.ip = request.getHeader("X-Real-IP");
|
|
|
|
|
}else {
|
|
|
|
|
this.ip = request.getRemoteAddr();
|
|
|
|
|
}
|
|
|
|
|
this.startTime = LocalDateTime.now();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|