|
@@ -19,8 +19,6 @@ import com.qmth.teachcloud.common.service.TeachcloudCommonService;
|
|
|
import com.qmth.teachcloud.common.util.ExcelUtil;
|
|
|
import com.qmth.teachcloud.common.util.ServletUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -38,8 +36,6 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class ClientServiceImpl implements ClientService {
|
|
|
|
|
|
- private static final Logger logger = LoggerFactory.getLogger(ClientServiceImpl.class);
|
|
|
-
|
|
|
@Autowired
|
|
|
private ExamTaskService examTaskService;
|
|
|
|
|
@@ -590,8 +586,8 @@ public class ClientServiceImpl implements ClientService {
|
|
|
@Override
|
|
|
public void checkPrivilege(Long userId) {
|
|
|
List<SysPrivilege> sysPrivileges = sysPrivilegeService.getClientUrlByUserId(userId);
|
|
|
- logger.info("json1111:{}, istrue:{}", JSONObject.toJSONString(sysPrivileges), CollectionUtils.isEmpty(sysPrivileges));
|
|
|
- if(CollectionUtils.isEmpty(sysPrivileges)){
|
|
|
+ long count = sysPrivileges.stream().filter(m -> "客户端".equals(m.getName()) && "client".equals(m.getUrl())).count();
|
|
|
+ if(count == 0){
|
|
|
throw ExceptionResultEnum.ERROR.exception("用户没有权限,无法登录");
|
|
|
}
|
|
|
}
|