class RoleMenuFilter implements FilterHandler {

    @Resource
    private EruptUserService eruptUserService;

    @Resource
    private EruptUpmsProp eruptUpmsProp;

    @Override
    public String filter(String condition, String[] params) {<FILL_FUNCTION_BODY>}

}

        EruptUser eruptUser = eruptUserService.getCurrentEruptUser();
        if (eruptUser.getIsAdmin() || !eruptUpmsProp.isStrictRoleMenuLegal()) {
            return null;
        } else {
            Set<EruptMenu> menuSet = new HashSet<>();
            eruptUser.getRoles().stream().filter(EruptRole::getStatus).map(EruptRole::getMenus).forEach(menuSet::addAll);
            List<String> menus = menuSet.stream().map(it -> it.getId().toString()).collect(Collectors.toList());
            return String.format("EruptMenu.id in (%s)", String.join(",", String.join(",", menus)));
        }
    
<no_super_class>