custauth
This commit is contained in:
parent
df46fd869f
commit
5b7a8241b1
|
|
@ -78,6 +78,8 @@ public class TokenController {
|
|||
@Resource
|
||||
private RemoteConfigService configService;
|
||||
|
||||
private static final String CUST_LOGIN_TOKEN_KEY = "cust_login_tokens:";
|
||||
|
||||
@PostMapping("isAdmin")
|
||||
public R<?> isAdmin(@RequestBody LoginBody form) {
|
||||
if (!config.isAdmin()) {
|
||||
|
|
@ -135,7 +137,7 @@ public class TokenController {
|
|||
{
|
||||
concurrency = Long.parseLong(result.get("msg").toString());
|
||||
}
|
||||
Collection<String> keys = redisService.keys(CacheConstants.LOGIN_TOKEN_KEY + "*");
|
||||
Collection<String> keys = redisService.keys(CUST_LOGIN_TOKEN_KEY + "*");
|
||||
if (keys.size() >= concurrency){
|
||||
return R.fail("当前系统用户并发数超过系统配置,请稍后再试");
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue