| | |
| | | return false; |
| | | } |
| | | |
| | | if (0 < this.count(new LambdaQueryWrapper<Tenant>().eq(Tenant::getName, param.getName()))) { |
| | | throw new CoolException("tenant name already exist"); |
| | | } |
| | | if (0 < this.count(new LambdaQueryWrapper<Tenant>().eq(Tenant::getFlag, param.getFlag()))) { |
| | | throw new CoolException("tenant flag already exist"); |
| | | } |
| | | |
| | | if (null != userService.getByUsername(param.getUsername(), null)) { |
| | | throw new CoolException("the username already exist"); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | if (0 < this.count(new LambdaQueryWrapper<Tenant>().eq(Tenant::getName, param.getName()))) { |
| | | throw new CoolException("tenant name already exist"); |
| | | } |
| | | if (0 < this.count(new LambdaQueryWrapper<Tenant>().eq(Tenant::getFlag, param.getFlag()))) { |
| | | throw new CoolException("tenant flag already exist"); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | // save tenant |
| | | Tenant tenant = new Tenant(); |