|
@@ -99,7 +99,7 @@ public class MnpBuildingService implements BaseService<MnpBuilding, MnpBuildingE
|
|
|
public int deleteByPrimaryKey(String id) {
|
|
public int deleteByPrimaryKey(String id) {
|
|
|
// 先查询该楼栋下是否存在房间
|
|
// 先查询该楼栋下是否存在房间
|
|
|
ParkRoomExample parkRoomExample = new ParkRoomExample();
|
|
ParkRoomExample parkRoomExample = new ParkRoomExample();
|
|
|
- parkRoomExample.createCriteria().andBuildIdEqualTo(id);
|
|
|
|
|
|
|
+ parkRoomExample.createCriteria().andBuildIdEqualTo(id).andDelFlagEqualTo("0");
|
|
|
long count = parkRoomService.countByExample(parkRoomExample);
|
|
long count = parkRoomService.countByExample(parkRoomExample);
|
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
|
throw new RuntimeException("该楼栋下存在房间,无法删除!");
|
|
throw new RuntimeException("该楼栋下存在房间,无法删除!");
|