提交 91b8a091 authored 作者: 李炎's avatar 李炎

租户效验

上级 74fda6ba
......@@ -39,6 +39,10 @@ public class LicInfoController {
if (!StringUtil.isNull(mac)) {
return RestResponse.fail("MAC地址已存在");
}
LicInfoListOutVoRecords licInfoByTenantId = licInfoMapper.getLicInfoByTenantId(inVo.getTenantId());
if (!StringUtil.isNull(licInfoByTenantId)) {
return RestResponse.fail("租户标识已存在");
}
locInfoService.licInfoCreate(inVo);
return RestResponse.success();
}
......
......@@ -48,6 +48,15 @@ public interface LicInfoMapper {
* @return Lic信息
*/
LicInfoListOutVoRecords getLicInfoByMacAddress(String macAddress);
/**
* 根据tenantId地址查询Lic信息
*
* @param macAddress MAC地址
* @return Lic信息
*/
LicInfoListOutVoRecords getLicInfoByTenantId(String tenantId);
/**
* 根据id查询Lic信息
*
......
......@@ -69,6 +69,14 @@
</select>
<select id="getLicInfoByTenantId" parameterType="java.lang.String"
resultType="com.system.transfer.lic.LicInfoListOutVoRecords">
SELECT
id,tenant_id,domain_name, lq_lic_name, mac_address, effective_time, file_effective_time, verification_interval, module_verification, docker_services, create_time
FROM tb_lic_info WHERE tenant_id = #{tenantId}
</select>
<select id="getLicInfoById" parameterType="java.lang.Integer"
resultType="com.system.transfer.lic.LicInfoListOutVoRecords">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论