|
@@ -4,6 +4,7 @@ import java.util.List;
|
4
|
4
|
import java.util.stream.Collectors;
|
5
|
5
|
|
6
|
6
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
7
|
+import com.ruoyi.common.constant.PostLevelEnum;
|
7
|
8
|
import com.ruoyi.common.exception.base.BaseException;
|
8
|
9
|
import com.ruoyi.common.utils.SecurityUtils;
|
9
|
10
|
import com.ruoyi.system.domain.UserPostAuthority;
|
|
@@ -190,11 +191,9 @@ public class SysPostServiceImpl implements ISysPostService {
|
190
|
191
|
*/
|
191
|
192
|
@Override
|
192
|
193
|
public boolean userHaveAuthority(Long deptId) {
|
193
|
|
- Integer postLevel = 1;//岗位级别:0-不设置;1-经理;
|
194
|
194
|
Long userId = SecurityUtils.getUserId();
|
195
|
|
-
|
196
|
195
|
// 判断岗位是否在权限范围内
|
197
|
|
- List<UserPostAuthority> userPostAuthorityList = userPostAuthorityList(deptId, postLevel);
|
|
196
|
+ List<UserPostAuthority> userPostAuthorityList = userPostAuthorityList(deptId, PostLevelEnum.SET_MANAGER.getValue());
|
198
|
197
|
if (CollectionUtils.isEmpty(userPostAuthorityList)) {
|
199
|
198
|
return false;
|
200
|
199
|
}
|