package com.vci.web.controller;
|
|
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.frameworkcore.pagemodel.SmFunctionVO;
|
import com.vci.starter.web.annotation.controller.VciUnCheckRight;
|
import com.vci.starter.web.pagemodel.*;
|
import com.vci.web.pageModel.UIContentVO;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
|
/**
|
* 系统功能控制器
|
* @author weidy
|
*/
|
@RestController
|
@RequestMapping("/smFunctionController")
|
public class SmFunctionController {
|
|
/**
|
* 功能查询服务
|
*/
|
@Autowired
|
private ISmFunctionQueryService functionQueryService;
|
|
|
/**
|
* 获取当前用户的菜单
|
* @param treeQueryObject 树查询对象
|
* @return 树节点,出现错误会在异常处理器中统一返回Json
|
*/
|
@VciUnCheckRight
|
@GetMapping("/treeMyMenu")
|
public List<MenuVO> treeMyMenu(TreeQueryObject treeQueryObject) throws VCIError {
|
return functionQueryService.treeCurrentUserMenu(treeQueryObject, ResourceControlTypeEnum.BS);
|
}
|
|
/**
|
* 获取当前用户的菜单
|
* @param treeQueryObject 树查询对象
|
* @return 树节点,出现错误会在异常处理器中统一返回Json
|
*/
|
@VciUnCheckRight
|
@GetMapping("/getUIContentByBtmTypeAndId")
|
public UIContentVO getUIContentByBtmTypeAndId(@RequestBody TreeQueryObject treeQueryObject) throws VCIError {
|
return functionQueryService.getUIContentByBtmTypeAndId(treeQueryObject, ResourceControlTypeEnum.BS);
|
}
|
|
/**
|
* 获取所有的功能菜单
|
* @param treeQueryObject 树查询对象
|
* @return 树节点,出现错误会在异常处理器中统一返回Json
|
*/
|
@GetMapping("/treeAllMenu")
|
public List<Tree> treeAllMenu(TreeQueryObject treeQueryObject){
|
return functionQueryService.treeAllMenu(treeQueryObject, ResourceControlTypeEnum.BS);
|
}
|
|
/**
|
* 通过上级节点获取下级的所有的菜单节点
|
* @param treeQueryObject 树查询对象
|
* @return 树节点,出现错误会在异常处理器中统一返回Json
|
*/
|
@GetMapping("/treeFunctionByParent")
|
public List<Tree> treeFunctionByParent(TreeQueryObject treeQueryObject) {
|
return new ArrayList<Tree>();
|
}
|
|
/**
|
* 通过上级节点获取当前用户有权限的下级的所有的菜单节点
|
* @param treeQueryObject 树查询对象
|
* @return List<Tree>,其中treeList属性才是树节点
|
*/
|
@GetMapping("/treeMyFunctionByParent")
|
public List<Tree> treeMyFunctionByParent(TreeQueryObject treeQueryObject) {
|
return new ArrayList<Tree>();
|
}
|
|
/**
|
* 获取系统功能列表
|
* @param queryObject 查询、排序和分页对象
|
* @return DataGrid 系统功能列表
|
*/
|
@GetMapping("/dataGrid")
|
public DataGrid<SmFunctionVO> dataGrid(BaseQueryObject queryObject){
|
return new DataGrid<>();
|
}
|
|
|
|
|
}
|