From 7dfa67c88cda91e505e6136c324d73bd3aa5fbda Mon Sep 17 00:00:00 2001 From: Yjoioooo <693337446@qq.com> Date: Mon, 27 Mar 2023 13:58:49 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=81=97=E6=BC=8F=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E5=90=8Ereturn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/controller/system/SysOssController.java | 2 +- .../ruoyi/system/controller/system/SysTenantController.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java index 89fb8600..e7192b85 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java @@ -72,7 +72,7 @@ public class SysOssController extends BaseController { @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public R upload(@RequestPart("file") MultipartFile file) { if (ObjectUtil.isNull(file)) { - R.fail("上传文件不能为空"); + return R.fail("上传文件不能为空"); } SysOssVo oss = ossService.upload(file); SysOssUploadVo uploadVo = new SysOssUploadVo(); diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java index 8f388840..5b264bd8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java @@ -89,7 +89,7 @@ public class SysTenantController extends BaseController { @PostMapping() public R add(@Validated(AddGroup.class) @RequestBody SysTenantBo bo) { if (!tenantService.checkCompanyNameUnique(bo)) { - R.fail("新增租户'" + bo.getCompanyName() + "'失败,企业名称已存在"); + return R.fail("新增租户'" + bo.getCompanyName() + "'失败,企业名称已存在"); } return toAjax(tenantService.insertByBo(bo)); } @@ -105,7 +105,7 @@ public class SysTenantController extends BaseController { public R edit(@Validated(EditGroup.class) @RequestBody SysTenantBo bo) { tenantService.checkTenantAllowed(bo.getTenantId()); if (!tenantService.checkCompanyNameUnique(bo)) { - R.fail("修改租户'" + bo.getCompanyName() + "'失败,公司名称已存在"); + return R.fail("修改租户'" + bo.getCompanyName() + "'失败,公司名称已存在"); } return toAjax(tenantService.updateByBo(bo)); }