| | |
| | | import java.io.FileWriter; |
| | | import java.io.IOException; |
| | | import java.io.InputStreamReader; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | if (licenseMap.get(tenantId) != null) { |
| | | return licenseMap.get(tenantId); |
| | | } |
| | | Tenant tenant = (Tenant) tenantMapper.selectOne(Lambda.eq((v0) -> { |
| | | return v0.getTenantId(); |
| | | }, tenantId)); |
| | | Tenant tenant = tenantMapper.selectOne(Lambda.eq(Tenant::getTenantId, tenantId)); |
| | | if (Func.isNotEmpty(tenant.getBladeLicense())) { |
| | | licenseMap.put(Func.toStr(tenant.getTenantId()), tenant.getBladeLicense()); |
| | | } |
| | |
| | | Tenant tenant = new Tenant(); |
| | | tenant.setTenantId(tenantId); |
| | | tenant.setBladeLicense(encrypt); |
| | | tenantMapper.update(tenant, Lambda.eq((v0) -> { |
| | | return v0.getTenantId(); |
| | | }, tenant.getTenantId())); |
| | | tenantMapper.update(tenant, Lambda.eq(Tenant::getTenantId, tenant.getTenantId())); |
| | | } |
| | | |
| | | public static LicenseDetailDTO loadLicense(String tenantId) throws LicenseException { |