Commit 22ff5980 by lzy

房间判断删除

parent 0aae7ba9
......@@ -12,6 +12,7 @@ import com.makeit.dto.platform.workstation.WorkStationQueryDTO;
import com.makeit.entity.platform.space.PlatBed;
import com.makeit.entity.platform.space.PlatRoom;
import com.makeit.enums.CodeMessageEnum;
import com.makeit.enums.CommonEnum;
import com.makeit.exception.BusinessException;
import com.makeit.mapper.platform.space.PlatRoomMapper;
import com.makeit.service.platform.space.PlatBedService;
......@@ -97,6 +98,7 @@ public class PlatRoomServiceImpl extends ServiceImpl<PlatRoomMapper, PlatRoom> i
LambdaQueryWrapper<PlatBed> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(PlatBed::getRoomId, ids);
queryWrapper.eq(PlatBed::getStatus, CommonEnum.NO.getValue());
if (platBedService.count(queryWrapper) > 0) {
throw new BusinessException(CodeMessageEnum.PLATFORM_ERROR_ROOM_EXIT_BAD);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment