个人资料接口分开

master 20240320
cheney 9 months ago
parent 1d7e279bf7
commit a0353a8567
  1. 4
      src/main/java/com/huoran/iasf/common/config/WebMvcConfigurer.java
  2. 3
      src/main/java/com/huoran/iasf/controller/SysFilesController.java
  3. 9
      src/main/java/com/huoran/iasf/controller/UserController.java

@ -50,8 +50,8 @@ public class WebMvcConfigurer extends WebMvcConfigurationSupport {
// corsConfiguration.addAllowedOrigin("*"); // 允许任何头 // corsConfiguration.addAllowedOrigin("*"); // 允许任何头
corsConfiguration.addAllowedOrigin("https://new.iasf.ac.cn"); //允许信任域名 corsConfiguration.addAllowedOrigin("https://new.iasf.ac.cn"); //允许信任域名
corsConfiguration.addAllowedOrigin("https://www.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:8095"); //允许信任域名
corsConfiguration.addAllowedOrigin("http://192.168.31.125:8089"); //允许信任域名 // corsConfiguration.addAllowedOrigin("http://192.168.31.125:8088"); //允许信任域名
corsConfiguration.addAllowedOrigin("http://10.10.11.7"); //允许信任域名 corsConfiguration.addAllowedOrigin("http://10.10.11.7"); //允许信任域名
corsConfiguration.addAllowedMethod("*"); // 允许任何方法(post、get等) corsConfiguration.addAllowedMethod("*"); // 允许任何方法(post、get等)
return corsConfiguration; return corsConfiguration;

@ -22,6 +22,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -77,7 +78,7 @@ public class SysFilesController {
@NoRepeatSubmit @NoRepeatSubmit
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@PostMapping("/upload") @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( public UEditorResultVO add(
@RequestParam(required = false) String action, @RequestParam(required = false) String action,
@RequestParam(value = "file") MultipartFile file, FileParameters fileParameters) throws Exception { @RequestParam(value = "file") MultipartFile file, FileParameters fileParameters) throws Exception {

@ -109,6 +109,15 @@ public class UserController {
return R.success(userResp); 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") @PostMapping("/users")
@ApiOperation(value = "分页获取用户列表接口") @ApiOperation(value = "分页获取用户列表接口")
@RequiresPermissions("sys:user:list") @RequiresPermissions("sys:user:list")

Loading…
Cancel
Save