fix: 新增用户时报错,租户id查询
parent
841f6a82e4
commit
dc67b35d74
|
@ -44,7 +44,9 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
||||||
@Cacheable(cacheNames = CacheNames.SYS_TENANT, key = "#tenantId")
|
@Cacheable(cacheNames = CacheNames.SYS_TENANT, key = "#tenantId")
|
||||||
@Override
|
@Override
|
||||||
public SysTenantVo queryByTenantId(String tenantId) {
|
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);
|
return MapstructUtils.convert(tenant,SysTenantVo.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +99,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkAccountBalance(String tenantId) {
|
public boolean checkAccountBalance(String tenantId) {
|
||||||
SysTenantVo tenant = SpringUtils.getAopProxy(this).queryByTenantId(tenantId);
|
SysTenantVo tenant = this.queryByTenantId(tenantId);
|
||||||
// 如果余额为-1代表不限制
|
// 如果余额为-1代表不限制
|
||||||
if (tenant.getAccountCount() == -1) {
|
if (tenant.getAccountCount() == -1) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue