From 65843d55a07693e7651934bf740c6bce0aabfde8 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 27 Oct 2021 10:17:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E4=B8=BA=201.2.0-snapshot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../controller/file/InfFileController.java | 9 ++++--- .../infra/service/file/InfFileService.java | 24 ------------------- .../service/file/impl/InfFileServiceImpl.java | 18 -------------- .../system/enums/SysErrorCodeConstants.java | 1 - yudao-core-service/pom.xml | 2 +- yudao-dependencies/pom.xml | 2 +- .../user/SysUserProfileController.java | 1 + .../service/user/impl/MbrUserServiceImpl.java | 1 + 更新日志.md | 10 +++++--- 10 files changed, 18 insertions(+), 52 deletions(-) diff --git a/pom.xml b/pom.xml index 1ca158c9..b6290c1d 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 1.1.0-snapshot + 1.2.0-snapshot 1.8 ${java.version} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/InfFileController.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/InfFileController.java index b2a49d6e..ede2a68b 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/InfFileController.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/controller/file/InfFileController.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.adminserver.modules.infra.service.file.InfFileService; import cn.iocoder.yudao.adminserver.modules.infra.controller.file.vo.InfFilePageReqVO; import cn.iocoder.yudao.coreservice.modules.infra.controller.file.vo.InfFileRespVO; import cn.iocoder.yudao.coreservice.modules.infra.dal.dataobject.file.InfFileDO; +import cn.iocoder.yudao.coreservice.modules.infra.service.file.InfFileCoreService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.adminserver.modules.infra.convert.file.InfFileConvert; @@ -36,6 +37,8 @@ public class InfFileController { @Resource private InfFileService fileService; + @Resource + private InfFileCoreService fileCoreService; @PostMapping("/upload") @ApiOperation("上传文件") @@ -45,7 +48,7 @@ public class InfFileController { }) public CommonResult uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("path") String path) throws IOException { - return success(fileService.createFile(path, IoUtil.readBytes(file.getInputStream()))); + return success(fileCoreService.createFile(path, IoUtil.readBytes(file.getInputStream()))); } @DeleteMapping("/delete") @@ -53,7 +56,7 @@ public class InfFileController { @ApiImplicitParam(name = "id", value = "编号", required = true) @PreAuthorize("@ss.hasPermission('infra:file:delete')") public CommonResult deleteFile(@RequestParam("id") String id) { - fileService.deleteFile(id); + fileCoreService.deleteFile(id); return success(true); } @@ -61,7 +64,7 @@ public class InfFileController { @ApiOperation("下载文件") @ApiImplicitParam(name = "path", value = "文件附件", required = true, dataTypeClass = MultipartFile.class) public void getFile(HttpServletResponse response, @PathVariable("path") String path) throws IOException { - InfFileDO file = fileService.getFile(path); + InfFileDO file = fileCoreService.getFile(path); if (file == null) { log.warn("[getFile][path({}) 文件不存在]", path); response.setStatus(HttpStatus.NOT_FOUND.value()); diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileService.java index a98fd16a..1c8311b2 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileService.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/InfFileService.java @@ -11,30 +11,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; */ public interface InfFileService { - /** - * 保存文件,并返回文件的访问路径 - * - * @param path 文件路径 - * @param content 文件内容 - * @return 文件路径 - */ - String createFile(String path, byte[] content); - - /** - * 删除文件 - * - * @param id 编号 - */ - void deleteFile(String id); - - /** - * 获得文件 - * - * @param path 文件路径 - * @return 文件 - */ - InfFileDO getFile(String path); - /** * 获得文件分页 * diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/impl/InfFileServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/impl/InfFileServiceImpl.java index 69b4cf0d..b8967c63 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/impl/InfFileServiceImpl.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/infra/service/file/impl/InfFileServiceImpl.java @@ -21,24 +21,6 @@ public class InfFileServiceImpl implements InfFileService { @Resource private InfFileMapper fileMapper; - @Resource - private InfFileCoreService fileCoreService; - - @Override - public String createFile(String path, byte[] content) { - return fileCoreService.createFile(path,content); - } - - @Override - public void deleteFile(String id) { - fileCoreService.deleteFile(id); - } - - @Override - public InfFileDO getFile(String path) { - return fileCoreService.getFile(path); - } - @Override public PageResult getFilePage(InfFilePageReqVO pageReqVO) { return fileMapper.selectPage(pageReqVO); diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysErrorCodeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysErrorCodeConstants.java index 8a606e06..0fad26be 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysErrorCodeConstants.java +++ b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/system/enums/SysErrorCodeConstants.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.adminserver.modules.system.enums; import cn.iocoder.yudao.framework.common.exception.ErrorCode; -import javafx.beans.binding.MapExpression; /** * System 错误码枚举类 diff --git a/yudao-core-service/pom.xml b/yudao-core-service/pom.xml index 43cdae12..72d763a9 100644 --- a/yudao-core-service/pom.xml +++ b/yudao-core-service/pom.xml @@ -5,7 +5,7 @@ yudao cn.iocoder.boot - 1.1.0-snapshot + 1.2.0-snapshot 4.0.0 diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 125d3bda..723ea0c6 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -14,7 +14,7 @@ https://github.com/YunaiV/ruoyi-vue-pro - 1.1.0-snapshot + 1.2.0-snapshot 2.4.5 diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/controller/user/SysUserProfileController.java b/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/controller/user/SysUserProfileController.java index 11c5f706..870d3371 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/controller/user/SysUserProfileController.java +++ b/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/controller/user/SysUserProfileController.java @@ -55,5 +55,6 @@ public class SysUserProfileController { public CommonResult getUserInfo() { return success(userService.getUserInfo(getLoginUserId())); } + } diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/service/user/impl/MbrUserServiceImpl.java b/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/service/user/impl/MbrUserServiceImpl.java index 5bff9d6c..f340c5fe 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/service/user/impl/MbrUserServiceImpl.java +++ b/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/member/service/user/impl/MbrUserServiceImpl.java @@ -109,6 +109,7 @@ public class MbrUserServiceImpl implements MbrUserService { @Override public MbrUserInfoRespVO getUserInfo(Long userId) { MbrUserDO user = this.checkUserExists(userId); + // 拼接返回结果 MbrUserInfoRespVO userResp = new MbrUserInfoRespVO(); userResp.setNickName(user.getNickname()); userResp.setAvatar(user.getAvatar()); diff --git a/更新日志.md b/更新日志.md index 206599b2..6d5ea6f9 100644 --- a/更新日志.md +++ b/更新日志.md @@ -3,16 +3,20 @@ * 邮件 * 钉钉、飞书等通知 -## [v1.2.0] 待定 +## [v1.3.0] 待定 * 工作流 -## [v1.1.1] 待定 +## [v1.2.0] 进行中 + +* 新增用户前台的昵称、头像的修改 + +TODO * 支付 * 用户前台的社交登陆 -## [v1.1.0] 进行中 +## [v1.1.0] 2021.10.25 * 新增管理后台的企业微信、钉钉等社交登录 * 新增用户前台(例如说,用户使用的小程序)的后端项目 `yudao-user-server`