From 76e6a6797dae82af20e04865ec96d03fa60b8c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Thu, 8 Jun 2023 18:45:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E4=BC=A0=E5=8F=82?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=8D=E6=AD=A3=E7=A1=AE=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=20postgreSql=20=E5=90=8C=E6=AD=A5=E5=A5=97=E9=A4=90=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/system/controller/system/SysTenantController.java | 3 ++- .../java/org/dromara/system/service/ISysTenantService.java | 2 +- .../org/dromara/system/service/impl/SysTenantServiceImpl.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysTenantController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysTenantController.java index cd711ad1..fc1cdc08 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysTenantController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysTenantController.java @@ -168,7 +168,8 @@ public class SysTenantController extends BaseController { @SaCheckPermission("system:tenant:edit") @Log(title = "租户", businessType = BusinessType.UPDATE) @GetMapping("/syncTenantPackage") - public R syncTenantPackage(@NotBlank(message = "租户ID不能为空") String tenantId, @NotBlank(message = "套餐ID不能为空") String packageId) { + public R syncTenantPackage(@NotBlank(message = "租户ID不能为空") String tenantId, + @NotNull(message = "套餐ID不能为空") Long packageId) { return toAjax(TenantHelper.ignore(() -> tenantService.syncTenantPackage(tenantId, packageId))); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysTenantService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysTenantService.java index f889f2b1..d12ed95f 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysTenantService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysTenantService.java @@ -78,5 +78,5 @@ public interface ISysTenantService { /** * 同步租户套餐 */ - Boolean syncTenantPackage(String tenantId, String packageId); + Boolean syncTenantPackage(String tenantId, Long packageId); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysTenantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysTenantServiceImpl.java index 0cd574ad..eb681519 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysTenantServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysTenantServiceImpl.java @@ -337,7 +337,7 @@ public class SysTenantServiceImpl implements ISysTenantService { */ @Override @Transactional(rollbackFor = Exception.class) - public Boolean syncTenantPackage(String tenantId, String packageId) { + public Boolean syncTenantPackage(String tenantId, Long packageId) { SysTenantPackage tenantPackage = tenantPackageMapper.selectById(packageId); List roles = roleMapper.selectList( new LambdaQueryWrapper().eq(SysRole::getTenantId, tenantId));