管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-01-11 53175eeaeed78f9539145e042ae26ed9a1c28e06
src/main/java/com/lf/server/controller/all/PermsController.java
@@ -1,19 +1,25 @@
package com.lf.server.controller.all;
import com.lf.server.aspect.SysLog;
import com.lf.server.annotation.SysLog;
import com.lf.server.entity.all.MenusAuthEntity;
import com.lf.server.entity.all.PermsAuthEntity;
import com.lf.server.entity.all.ResAuthEntity;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.data.DirEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.StringHelper;
import com.lf.server.service.all.PermsService;
import com.lf.server.service.sys.MenuService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -29,6 +35,9 @@
    @Autowired
    TokenService tokenService;
    @Autowired
    MenuService menuService;
    @SysLog()
    @ApiOperation(value = "查询当前用户的资源授权")
@@ -114,4 +123,36 @@
            return fail(ex.getMessage(), false);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询用户角色")
    @GetMapping("/selectRoles")
    public ResponseMsg<Object> selectRoles(HttpServletRequest req, HttpServletResponse res) {
        try {
            //
            return success(null);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "递归查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "菜单名称", dataType = "String", paramType = "query", required = false, example = "管道基础大数据平台")
    })
    @GetMapping(value = "/selectMenuRecursive")
    public ResponseMsg<List<DirEntity>> selectMenuRecursive(String name) {
        try {
            if (StringHelper.isEmpty(name)) {
                name = "管道基础大数据平台";
            }
            List<DirEntity> list = menuService.selectMenuRecursive(name);
            return success(list);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
}