|
|
@@ -55,7 +55,7 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp |
|
|
|
queryWrapper.like("name", tenantQuery.getName()); |
|
|
|
} |
|
|
|
queryWrapper.eq("mark", 1); |
|
|
|
queryWrapper.orderByAsc("sort"); |
|
|
|
queryWrapper.orderByDesc("id"); |
|
|
|
|
|
|
|
// 查询分页数据 |
|
|
|
IPage<Tenant> page = new Page<>(tenantQuery.getPage(), tenantQuery.getLimit()); |
|
|
@@ -80,7 +80,7 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp |
|
|
|
public JsonResult addTenant(TenantDto tenantDto) { |
|
|
|
// 验证租户是否已存在 |
|
|
|
Integer count = tenantMapper.selectCount(new LambdaQueryWrapper<Tenant>() |
|
|
|
.eq(Tenant::getCode, tenantDto.getCode()) |
|
|
|
.eq(Tenant::getName, tenantDto.getName()) |
|
|
|
.eq(Tenant::getMark, 1)); |
|
|
|
if (count > 0) { |
|
|
|
return JsonResult.error("系统中已经存在相同的租户编码"); |
|
|
@@ -135,7 +135,7 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp |
|
|
|
// 验证账号 |
|
|
|
Integer count = tenantMapper.selectCount(new LambdaQueryWrapper<Tenant>() |
|
|
|
.ne(Tenant::getId, tenant.getId()) |
|
|
|
.eq(Tenant::getCode, tenantDto.getCode()) |
|
|
|
.eq(Tenant::getName, tenantDto.getName()) |
|
|
|
.eq(Tenant::getMark, 1)); |
|
|
|
if (count > 0) { |
|
|
|
return JsonResult.error("系统中已经存在相同的租户编码"); |