|
@@ -2,6 +2,7 @@ package com.zanxiang.game.module.manage.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.zanxiang.erp.security.annotation.PreAuthorize;
|
|
|
+import com.zanxiang.game.module.manage.enums.GameAuthEnum;
|
|
|
import com.zanxiang.game.module.manage.pojo.params.*;
|
|
|
import com.zanxiang.game.module.manage.pojo.vo.GameAuthRoleVO;
|
|
|
import com.zanxiang.game.module.manage.pojo.vo.GameAuthVO;
|
|
@@ -17,6 +18,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @author : lingfeng
|
|
|
* @time : 2023-08-17
|
|
@@ -97,4 +100,20 @@ public class GameAuthController {
|
|
|
public ResultVO<IPage<GameAuthRoleVO>> roleListOfPage(@Validated @RequestBody GameAuthRoleListParam param) {
|
|
|
return ResultVO.ok(gameAuthRoleService.listOfPage(param));
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取权限类型枚举")
|
|
|
+ @GetMapping(value = "/role/auth/type")
|
|
|
+ @PreAuthorize(permissionKey = "manage:gameServer:roleAuthType")
|
|
|
+ @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
|
|
|
+ public ResultVO<Map<String, String>> getGameAuthMap() {
|
|
|
+ return ResultVO.ok(GameAuthEnum.getGameAuthMap());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取权限类型枚举")
|
|
|
+ @GetMapping(value = "/role/auth/user")
|
|
|
+ @PreAuthorize(permissionKey = "manage:gameServer:roleAuthUser")
|
|
|
+ @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = Boolean.class)})
|
|
|
+ public ResultVO<Map<Long, String>> getUserByAuthType(@RequestParam String authType) {
|
|
|
+ return ResultVO.ok(gameAuthRoleService.getUserByAuthType(authType));
|
|
|
+ }
|
|
|
}
|