From dc67b35d74c3f9d11814aa56ed920f632c9533a6 Mon Sep 17 00:00:00 2001 From: jay <75509151@qq.com> Date: Tue, 8 Aug 2023 15:58:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=B6=E6=8A=A5=E9=94=99,=E7=A7=9F=E6=88=B7id=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cc/iotkit/system/service/impl/SysTenantServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iot-module/iot-system/src/main/java/cc/iotkit/system/service/impl/SysTenantServiceImpl.java b/iot-module/iot-system/src/main/java/cc/iotkit/system/service/impl/SysTenantServiceImpl.java index 23e100bd..beec1616 100644 --- a/iot-module/iot-system/src/main/java/cc/iotkit/system/service/impl/SysTenantServiceImpl.java +++ b/iot-module/iot-system/src/main/java/cc/iotkit/system/service/impl/SysTenantServiceImpl.java @@ -44,7 +44,9 @@ public class SysTenantServiceImpl implements ISysTenantService { @Cacheable(cacheNames = CacheNames.SYS_TENANT, key = "#tenantId") @Override public SysTenantVo queryByTenantId(String tenantId) { - SysTenant tenant = sysTenantData.findById(Long.valueOf(tenantId)); + SysTenant sysTenant = new SysTenant(); + sysTenant.setTenantId(tenantId); + SysTenant tenant = sysTenantData.findOneByCondition(sysTenant); return MapstructUtils.convert(tenant,SysTenantVo.class); } @@ -97,7 +99,7 @@ public class SysTenantServiceImpl implements ISysTenantService { @Override public boolean checkAccountBalance(String tenantId) { - SysTenantVo tenant = SpringUtils.getAopProxy(this).queryByTenantId(tenantId); + SysTenantVo tenant = this.queryByTenantId(tenantId); // 如果余额为-1代表不限制 if (tenant.getAccountCount() == -1) { return true;