package com.vci.web.controller; import com.vci.corba.common.PLException; import com.vci.corba.common.VCIError; import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum; import com.vci.frameworkcore.pagemodel.MenuVO; import com.vci.starter.web.annotation.controller.VciUnCheckRight; import com.vci.starter.web.pagemodel.BaseResult; import com.vci.starter.web.pagemodel.Tree; import com.vci.starter.web.pagemodel.TreeQueryObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * 登录控制器 * @author weidy * @date 2021-1-28 */ @Controller @RequestMapping("/stmFunctionController") public class StmFunctionController { /** * 功能查询服务 */ @Autowired private ISmFunctionQueryService functionQueryService; @VciUnCheckRight @PostMapping("/test") @ResponseBody public BaseResult logout(){ System.out.printf("hhhh"); return BaseResult.success(); } /** * 获取当前用户的菜单 * @param treeQueryObject 树查询对象 * @return 树节点,出现错误会在异常处理器中统一返回Json */ @VciUnCheckRight @GetMapping("/getTreeMyMenu") @ResponseBody public List getTreeMyMenu(TreeQueryObject treeQueryObject) throws PLException { return functionQueryService.treeCurrentUserMenu(treeQueryObject, ResourceControlTypeEnum.BS); } }