|
@@ -5,21 +5,15 @@ import java.nio.charset.Charset;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.Date;
|
|
|
import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
-
|
|
|
import javax.servlet.ServletException;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.web.context.WebApplicationContext;
|
|
|
-import org.springframework.web.context.support.WebApplicationContextUtils;
|
|
|
import org.springframework.web.method.HandlerMethod;
|
|
|
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
|
|
-
|
|
|
import com.ym.mec.util.json.JsonUtil;
|
|
|
import com.ym.mec.util.web.WebUtil;
|
|
|
import com.yonge.log.dal.model.AuditLog;
|
|
@@ -39,6 +33,8 @@ public class AuditLogInterceptor extends HandlerInterceptorAdapter {
|
|
|
|
|
|
private String username;
|
|
|
|
|
|
+ private Integer userId;
|
|
|
+
|
|
|
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
@Override
|
|
@@ -73,14 +69,16 @@ public class AuditLogInterceptor extends HandlerInterceptorAdapter {
|
|
|
}
|
|
|
// 操作人
|
|
|
auditLog.setUsername(username);
|
|
|
+ auditLog.setUserId(userId);
|
|
|
auditLog.setOperateTime(sdf.format(new Date()));
|
|
|
auditLogService.insert(auditLog);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- public void setUsername(String username) {
|
|
|
+ public void setUsername(String username,Integer userId) {
|
|
|
this.username = username;
|
|
|
+ this.userId = userId;
|
|
|
}
|
|
|
|
|
|
}
|