class EruptServerApi {

    @Resource
    private EruptDao eruptDao;

    @Resource
    private EruptSessionService eruptSessionService;

    @Resource
    private EruptContextService eruptContextService;

    @Resource
    private EruptUserService eruptUserService;

    @Resource
    private EruptNodeMicroservice eruptNodeMicroservice;

    @GetMapping(CloudRestApiConst.ERUPT_POWER)
    public PowerObject eruptPower(@RequestParam String eruptName, @RequestParam String nodeName) {
        PowerObject powerObject = new PowerObject();
        List<String> values = eruptSessionService.getMapKeys(SessionKey.MENU_VALUE_MAP + eruptContextService.getCurrentToken());
        Map<String, Boolean> permissionMap = values.stream().collect(Collectors.toMap(it -> it, it -> true));
        String name = nodeName + EruptConst.DOT + eruptName;
        powerObject.setQuery(permissionMap.containsKey(name.toLowerCase()));
        powerObject.setAdd(powerOff(EruptFunPermissions.ADD, permissionMap, name));
        powerObject.setDelete(powerOff(EruptFunPermissions.DELETE, permissionMap, name));
        powerObject.setAdd(powerOff(EruptFunPermissions.ADD, permissionMap, name));
        powerObject.setEdit(powerOff(EruptFunPermissions.EDIT, permissionMap, name));
        powerObject.setExport(powerOff(EruptFunPermissions.EXPORT, permissionMap, name));
        powerObject.setImportable(powerOff(EruptFunPermissions.IMPORTABLE, permissionMap, name));
        powerObject.setViewDetails(powerOff(EruptFunPermissions.VIEW_DETAIL, permissionMap, name));
        return powerObject;
    }

    @GetMapping(CloudRestApiConst.NODE_CONFIG + "/{nodeName}")
    public String getNodeConfig(@PathVariable String nodeName, @RequestHeader(CloudCommonConst.HEADER_ACCESS_TOKEN) String accessToken) {
        return (String) eruptDao.getEntityManager()
                .createQuery("select config from CloudNode where nodeName = :nodeName and accessToken = :accessToken")
                .setParameter("nodeName", nodeName)
                .setParameter("accessToken", accessToken).getSingleResult();
    }

    @GetMapping(CloudRestApiConst.NODE_GROUP_CONFIG + "/{nodeName}")
    public String getNodeGroupConfig(@PathVariable String nodeName, @RequestHeader(CloudCommonConst.HEADER_ACCESS_TOKEN) String accessToken) {<FILL_FUNCTION_BODY>}



    //用户信息
    @GetMapping(CloudRestApiConst.ERUPT_USER_INFO + "/{nodeName}")
    @EruptRouter(verifyType = EruptRouter.VerifyType.LOGIN)
    public MetaUserinfo userinfo(@PathVariable String nodeName, @RequestHeader(CloudCommonConst.HEADER_ACCESS_TOKEN) String accessToken) {
        eruptNodeMicroservice.findNodeByAppName(nodeName, accessToken);
        return eruptUserService.getSimpleUserInfo();
    }

    private boolean powerOff(EruptFunPermissions eruptFunPermissions, Map<String, Boolean> permissionMap, String name) {
        return permissionMap.containsKey(UPMSUtil.getEruptFunPermissionsCode(name, eruptFunPermissions).toLowerCase());
    }

}

        return (String) eruptDao.getEntityManager()
                .createQuery("select cloudNodeGroup.config from CloudNode where nodeName = :nodeName and accessToken = :accessToken")
                .setParameter("nodeName", nodeName)
                .setParameter("accessToken", accessToken).getSingleResult();
    
<no_super_class>