|
|
@@ -140,12 +140,12 @@ public class HlgPlatformServiceImpl extends ServiceImpl<HlgPlatformMapper, HlgPl
|
|
|
public Result<HlgPlatform> deletePlatform(String id) {
|
|
|
Result<HlgPlatform> result = new Result<HlgPlatform>();
|
|
|
//企业数据
|
|
|
- int count = hlgCompanyService.getCountByPlatformId(id);
|
|
|
+ int countCom = hlgCompanyService.getCountByPlatformId(id);
|
|
|
//用户数据
|
|
|
-
|
|
|
+ int countUser = baseMapper.getCountUserByPlatformId(id);
|
|
|
//服务商数据
|
|
|
int countSub = hlgPlatformSubcontractorService.getCountByPlatformId(id);
|
|
|
- if (count > 0 || countSub > 0) {
|
|
|
+ if (countCom > 0 || countUser > 0 || countSub > 0) {
|
|
|
result.error500("该平台已存在业务数据,无法删除");
|
|
|
return result;
|
|
|
}
|