修复租户套餐管理无法删除的错误

This commit is contained in:
数据小王子 2024-02-06 14:49:45 +08:00
parent 9e4171f4ad
commit a601c8c54c

View File

@ -178,7 +178,7 @@ public class SysTenantPackageServiceImpl extends BaseServiceImpl<SysTenantPackag
@Transactional(rollbackFor = Exception.class)
public boolean deleteByIds(Long[] packageIds, Boolean isValid) {
if(isValid){
boolean exists = tenantMapper.selectCountByQuery(query().where(SYS_TENANT.PACKAGE_ID.in(List.of(packageIds)))) >0;
boolean exists = tenantMapper.selectCountByQuery(QueryWrapper.create().from(SYS_TENANT).where(SYS_TENANT.PACKAGE_ID.in(List.of(packageIds)))) >0;
if (exists) {
throw new ServiceException("租户套餐已被使用");
}