| | |
| | | |
| | | import com.oying.modules.security.service.OnlineUserService; |
| | | import com.oying.modules.security.service.dto.OnlineUserDto; |
| | | import com.oying.utils.R; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Set; |
| | |
| | | @ApiOperation("查询在线用户") |
| | | @GetMapping |
| | | @PreAuthorize("@el.check()") |
| | | public ResponseEntity<PageResult<OnlineUserDto>> queryOnlineUser(String username, Pageable pageable){ |
| | | return new ResponseEntity<>(onlineUserService.getAll(username, pageable),HttpStatus.OK); |
| | | public ResponseEntity<Object> queryOnlineUser(String username, Pageable pageable) { |
| | | return new ResponseEntity<>(R.success(onlineUserService.getAll(username, pageable)), HttpStatus.OK); |
| | | } |
| | | |
| | | @ApiOperation("导出数据") |
| | |
| | | token = EncryptUtils.desDecrypt(token); |
| | | onlineUserService.logout(token); |
| | | } |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |