| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Collections; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | private void saveLog(JoinPoint joinPoint, Object result, Exception e) { |
| | | OperationRecord record = new OperationRecord(); |
| | | Long endTime = startTime.get(); |
| | | record.setCreateTime(new Date()); |
| | | // 记录操作耗时 |
| | | if (endTime != null) { |
| | | record.setSpendTime((int) (System.currentTimeMillis() - endTime)); |
| | |
| | | } |
| | | } |
| | | } |
| | | operationRecordService.save(record); |
| | | operationRecordService.saveAsync(record); |
| | | } |
| | | |
| | | /** |