|
@@ -5,6 +5,10 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
+import com.bootdo.common.utils.ShiroUtils;
|
|
|
+import com.bootdo.system.domain.UserDO;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
@@ -18,6 +22,7 @@ import com.bootdo.system.dao.UserRoleDao;
|
|
|
import com.bootdo.system.domain.RoleDO;
|
|
|
import com.bootdo.system.domain.RoleMenuDO;
|
|
|
import com.bootdo.system.service.RoleService;
|
|
|
+import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
|
|
|
@Service
|
|
@@ -26,6 +31,7 @@ public class RoleServiceImpl implements RoleService {
|
|
|
public static final String ROLE_ALL_KEY = "\"role_all\"";
|
|
|
|
|
|
public static final String DEMO_CACHE_NAME = "role";
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(RoleServiceImpl.class);
|
|
|
|
|
|
@Autowired
|
|
|
RoleDao roleMapper;
|
|
@@ -101,7 +107,17 @@ public class RoleServiceImpl implements RoleService {
|
|
|
|
|
|
@Override
|
|
|
public List<RoleDO> getExamineList() {
|
|
|
- return roleMapper.getExamineList();
|
|
|
+ UserDO currUser = ShiroUtils.getUser();
|
|
|
+ List<RoleDO> examineList = roleMapper.getExamineList();
|
|
|
+ log.info("-----" + currUser);
|
|
|
+ log.info("------" + currUser.getUserId());
|
|
|
+ //获取当前用户信息
|
|
|
+ List<Long> longs = userRoleMapper.listRoleId(currUser.getUserId());
|
|
|
+ Long id = roleMapper.getRoleId("企业填报员");
|
|
|
+ if (longs.contains(id)) {
|
|
|
+ examineList.removeIf(roleDO -> !"市级审核员".equals(roleDO.getRoleName()));
|
|
|
+ }
|
|
|
+ return examineList;
|
|
|
}
|
|
|
|
|
|
@Override
|