| | |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ArrayUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | SysRoleMenu rm = new SysRoleMenu(); |
| | | rm.setRoleId(role.getRoleId()); |
| | | rm.setMenuId(menuId); |
| | | // 判断是否有只看我权限 |
| | | if (ArrayUtils.isNotEmpty(role.getIsRersonalMenuIds())) { |
| | | for (Long isRersonalMenuId : role.getIsRersonalMenuIds()) { |
| | | if (isRersonalMenuId.equals(menuId)) { |
| | | rm.setIsRersonal(1); |
| | | } |
| | | } |
| | | } |
| | | list.add(rm); |
| | | |
| | | } |
| | | if (list.size() > 0) |
| | | { |