From 8297d94b51dc5dc8efe4567647de14238f0f6371 Mon Sep 17 00:00:00 2001 From: niudehua <657563945@qq.com> Date: Sat, 13 Mar 2021 22:24:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E8=AE=BE=E7=BD=AE=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/SysUserProfileController.java | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java index 1b2503c77..27a170560 100644 --- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java +++ b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/SysUserProfileController.java @@ -1,6 +1,5 @@ package cn.iocoder.dashboard.modules.system.controller.user; -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; import cn.iocoder.dashboard.common.pojo.CommonResult; import cn.iocoder.dashboard.framework.security.core.LoginUser; import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils; @@ -31,7 +30,6 @@ import java.io.IOException; import java.util.List; import static cn.iocoder.dashboard.common.pojo.CommonResult.success; -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.FILE_UPLOAD_FAILED; /** * @author niudehua @@ -49,11 +47,6 @@ public class SysUserProfileController { @Resource private SysRoleService roleService; - /** - * 个人信息 - * - * @return 个人信息详情 - */ @GetMapping("/get") @ApiOperation("获得登录用户信息") public CommonResult profile() { @@ -67,13 +60,6 @@ public class SysUserProfileController { return success(userProfileRespVO); } - /** - * 修改个人信息 - * - * @param reqVO 个人信息更新 reqVO - * @param request HttpServletRequest - * @return 修改结果 - */ @PostMapping("/update") @ApiOperation("修改用户个人信息") public CommonResult updateProfile(@RequestBody SysUserProfileUpdateReqVO reqVO, HttpServletRequest request) { @@ -82,12 +68,6 @@ public class SysUserProfileController { return success(true); } - /** - * 上传用户个人头像 - * - * @param file 头像文件 - * @return 上传结果 - */ @PostMapping("/upload-avatar") @ApiOperation("上传用户个人头像") public CommonResult uploadAvatar(@RequestParam("avatarFile") MultipartFile file) { @@ -99,7 +79,7 @@ public class SysUserProfileController { } } catch (IOException e) { log.error("文件上传失败", e); - throw ServiceExceptionUtil.exception(FILE_UPLOAD_FAILED); + throw new RuntimeException(e); } } return success(false);