package com.kidgrow.oauth2.controller;
|
|
import com.kidgrow.common.model.PageResult;
|
import com.kidgrow.common.model.ResultBody;
|
import com.kidgrow.oauth2.model.TokenVo;
|
import com.kidgrow.oauth2.service.ITokensService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.Map;
|
|
/**
|
* 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
|
*
|
* @Description: Token管理接口<br>
|
* @Project: <br>
|
* @CreateDate: Created in 2020/2/20 09:19 <br>
|
* @Author: <a href="4345453@kidgrow.com">liuke</a>
|
*/
|
@Api(tags = "Token管理")
|
@RestController
|
@RequestMapping("/tokens")
|
public class TokensController {
|
@Autowired
|
private ITokensService tokensService;
|
|
@GetMapping("")
|
@ApiOperation(value = "token列表")
|
public PageResult<TokenVo> list(@RequestParam Map<String, Object> params,@RequestParam(value = "tenantId") String tenantId) {
|
return tokensService.listTokens(params, tenantId);
|
}
|
/**
|
* 获取用户是否登录;
|
* @param map
|
* @return
|
*/
|
@PostMapping("getName")
|
@ApiOperation(value = "token列表")
|
public ResultBody isRegUser(@RequestBody Map<String, Object> map) {
|
|
return tokensService.getBeforLogin(map);
|
}
|
}
|