From a0353a8567e920d01725de0b5dab4f067b2f03db Mon Sep 17 00:00:00 2001 From: cheney <1251790704@qq.com> Date: Tue, 27 Feb 2024 17:00:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=B5=84=E6=96=99=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=88=86=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/huoran/iasf/common/config/WebMvcConfigurer.java | 4 ++-- .../com/huoran/iasf/controller/SysFilesController.java | 3 ++- .../java/com/huoran/iasf/controller/UserController.java | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/huoran/iasf/common/config/WebMvcConfigurer.java b/src/main/java/com/huoran/iasf/common/config/WebMvcConfigurer.java index 2538ed0..9d6ee9a 100644 --- a/src/main/java/com/huoran/iasf/common/config/WebMvcConfigurer.java +++ b/src/main/java/com/huoran/iasf/common/config/WebMvcConfigurer.java @@ -50,8 +50,8 @@ public class WebMvcConfigurer extends WebMvcConfigurationSupport { // corsConfiguration.addAllowedOrigin("*"); // 允许任何头 corsConfiguration.addAllowedOrigin("https://new.iasf.ac.cn"); //允许信任域名 corsConfiguration.addAllowedOrigin("https://www.iasf.ac.cn"); //允许信任域名 - corsConfiguration.addAllowedOrigin("http://192.168.31.125:8095"); //允许信任域名 - corsConfiguration.addAllowedOrigin("http://192.168.31.125:8089"); //允许信任域名 +// corsConfiguration.addAllowedOrigin("http://192.168.31.125:8095"); //允许信任域名 +// corsConfiguration.addAllowedOrigin("http://192.168.31.125:8088"); //允许信任域名 corsConfiguration.addAllowedOrigin("http://10.10.11.7"); //允许信任域名 corsConfiguration.addAllowedMethod("*"); // 允许任何方法(post、get等) return corsConfiguration; diff --git a/src/main/java/com/huoran/iasf/controller/SysFilesController.java b/src/main/java/com/huoran/iasf/controller/SysFilesController.java index 5aef0b0..0c8009c 100644 --- a/src/main/java/com/huoran/iasf/controller/SysFilesController.java +++ b/src/main/java/com/huoran/iasf/controller/SysFilesController.java @@ -22,6 +22,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.apache.commons.lang.StringUtils; +import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -77,7 +78,7 @@ public class SysFilesController { @NoRepeatSubmit @ApiOperation(value = "新增") @PostMapping("/upload") - // @RequiresPermissions(value = {"sysFiles:add", "sysContent:update", "sysContent:add"}, logical = Logical.OR) +// @RequiresPermissions(value = {"sysFiles:add", "sysContent:update", "sysContent:add"}, logical = Logical.OR) public UEditorResultVO add( @RequestParam(required = false) String action, @RequestParam(value = "file") MultipartFile file, FileParameters fileParameters) throws Exception { diff --git a/src/main/java/com/huoran/iasf/controller/UserController.java b/src/main/java/com/huoran/iasf/controller/UserController.java index 753546c..e729516 100644 --- a/src/main/java/com/huoran/iasf/controller/UserController.java +++ b/src/main/java/com/huoran/iasf/controller/UserController.java @@ -109,6 +109,15 @@ public class UserController { return R.success(userResp); } + @PostMapping("/personalData") + @ApiOperation(value = "查询个人资料接口") + @LogAnnotation(title = "用户管理", action = "查询个人资料接口") + public R personalData() { + Integer currentUserId = httpSessionService.getCurrentUserId(); + UserListResp userResp = userService.detailInfo(currentUserId); + return R.success(userResp); + } + @PostMapping("/users") @ApiOperation(value = "分页获取用户列表接口") @RequiresPermissions("sys:user:list")