xiaof 3 years ago
parent
commit
45ecfe920e

+ 5 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ClientServiceImpl.java

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