| | |
| | | OperatingSystem os = userAgent.getOperatingSystem(); |
| | | String content = "登录IP地址:" + IPUtils.getPublicIp() + ",操作系统:" + os + ",浏览器:" + browser; |
| | | |
| | | StoreOperationRecordsUtils.storeOperationData(null, null, "用户登录", content, null); |
| | | StoreOperationRecordsUtils.storeOperationData(null, null, "用户登录", content); |
| | | return ResponseUtil.success(authInfo); |
| | | } |
| | | |
| | |
| | | @GetMapping(value = "/logout") |
| | | public ResponseVO<Object> LogOut() { |
| | | String content = "用户名:" + SecurityUtils.getUsername(); |
| | | StoreOperationRecordsUtils.storeOperationData(null, null, "用户退出登录", content, null); |
| | | StoreOperationRecordsUtils.storeOperationData(null, null, "用户退出登录", content); |
| | | String key = String.format("%d_%d", SecurityUtils.getUserDetails().getUserId(), SecurityUtils.getUserDetails().getAdministratorType()); |
| | | redisService.set(key, null); |
| | | return ResponseUtil.success("退出登录成功"); |