class PermissionInfo {

        /**
         * 权限ID
         */
        @NotBlank
        @Schema(description = "权限ID")
        private String id;

        /**
         * 授权操作
         */
        @Schema(description = "允许执行的操作")
        private Set<String> actions;

        /**
         * 字段权限
         */
        @Hidden
        private List<FieldAccess> fieldAccess;

        /**
         * 数据权限
         */
        @Hidden
        private List<DataAccess> dataAccess;

        private PermissionInfo unwrap(AuthorizationSettingEntity entity) {<FILL_FUNCTION_BODY>}

        private void wrap(AuthorizationSettingEntity entity) {
            entity.setPermission(id);
            entity.setActions(actions);
            List<DataAccessEntity> entities = new ArrayList<>();
            if (CollectionUtils.isNotEmpty(fieldAccess)) {
                Map<String, Set<String>> group = new HashMap<>();
                for (FieldAccess access : fieldAccess) {
                    for (String action : access.getAction()) {
                        group.computeIfAbsent(action, r -> new HashSet<>())
                             .add(access.name);
                    }
                }
                for (Map.Entry<String, Set<String>> entry : group.entrySet()) {
                    DataAccessEntity dataAccessEntity = new DataAccessEntity();
                    dataAccessEntity.setAction(entry.getKey());
                    dataAccessEntity.setType(DataAccessConfig.DefaultType.DENY_FIELDS);
                    dataAccessEntity.setConfig(Collections.singletonMap("fields", entry.getValue()));
                    entities.add(dataAccessEntity);
                }
            }

            if (CollectionUtils.isNotEmpty(dataAccess)) {
                for (DataAccess access : dataAccess) {
                    entities.addAll(access.toEntity());
                }
            }
            entity.setDataAccesses(entities);
        }

        public static PermissionInfo of(String id, Collection<String> actions) {
            PermissionInfo info = new PermissionInfo();
            info.setId(id);
            info.setActions(new HashSet<>(actions));
            return info;
        }
    }

            this.id = entity.getPermission();
            this.actions = entity.getActions();
            this.fieldAccess = new ArrayList<>();
            this.dataAccess = new ArrayList<>();

            //filed : access
            Map<String, FieldAccess> filedAccessMap = new LinkedHashMap<>();


            //type : access
            Map<String, DataAccess> dataAccessMap = new LinkedHashMap<>();
            if (CollectionUtils.isNotEmpty(entity.getDataAccesses())) {
                for (DataAccessEntity access : entity.getDataAccesses()) {
                    //字段权限
                    if (DataAccessConfig.DefaultType.DENY_FIELDS.equalsIgnoreCase(access.getType())) {
                        Set<String> fields = Optional.ofNullable(access.getConfig())
                                                     .<Set<String>>map(conf -> new HashSet<>((Collection<String>) conf.get("fields")))
                                                     .orElseGet(HashSet::new);

                        for (String field : fields) {
                            filedAccessMap
                                .computeIfAbsent(field, filedName -> new FieldAccess(filedName, new HashSet<>()))
                                .getAction().add(access.getAction());
                        }
                    } else {
                        //维度权限
                        if (DataAccessConfig.DefaultType.DIMENSION_SCOPE.equalsIgnoreCase(access.getType())) {
                            DataAccess dataAccess = DataAccess.of(access);

                            dataAccessMap.computeIfAbsent(dataAccess.getType(), __ -> dataAccess)
                                .actions
                                .add(access.getAction());

                        }
                    }
                }
            }
            this.dataAccess.addAll(dataAccessMap.values());
            this.fieldAccess.addAll(filedAccessMap.values());

            return this;
        
<no_super_class>