You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.supervision.service.impl;
|
|
|
|
|
|
|
|
import com.baomidou.lock.annotation.Lock4j;
|
|
|
|
import com.supervision.constant.UserTokenConstant;
|
|
|
|
import com.supervision.service.DiagnoseHallService;
|
|
|
|
import com.supervision.usermanage.UserResourceCheck;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
@Slf4j
|
|
|
|
public class DiagnoseHallServiceImpl implements DiagnoseHallService {
|
|
|
|
|
|
|
|
private final UserResourceCheck userResourceCheck;
|
|
|
|
|
|
|
|
|
|
|
|
@Lock4j(name = "achieveDiagnoseResource")
|
|
|
|
@Override
|
|
|
|
public boolean achieveDiagnoseResource() {
|
|
|
|
// 如果小于数字人最大连接数,则可以连接
|
|
|
|
return userResourceCheck.achieveDiagnoseResource();
|
|
|
|
}
|
|
|
|
}
|