|
|
@@ -9,6 +9,7 @@ import java.util.Set;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.RoleMapper;
|
|
|
import com.goafanti.common.dao.RolePermissionMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
@@ -42,7 +43,13 @@ public class RoleServiceImpl extends BaseMybatisDao<RoleMapper> implements RoleS
|
|
|
|
|
|
@Override
|
|
|
public List<RoleBo> findRoles() {
|
|
|
- List<RolePermissionBo> res = roleMapper.findRolePermissions();
|
|
|
+ List<RolePermissionBo> res = null;
|
|
|
+ if (!TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
|
|
|
+ res = roleMapper.findRolePermissionsExceptAreaManager();
|
|
|
+ } else {
|
|
|
+ res = roleMapper.findRolePermissions();
|
|
|
+ }
|
|
|
+
|
|
|
Map<String, RoleBo> roleMap = new HashMap<>();
|
|
|
for (RolePermissionBo rp : res) {
|
|
|
RoleBo rb = roleMap.get(rp.getRid());
|