| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwBuildingMapper; |
| | | import com.doumee.dao.business.YwFloorMapper; |
| | | import com.doumee.dao.business.YwRoomMapper; |
| | | import com.doumee.dao.business.model.YwBuilding; |
| | | import com.doumee.dao.business.model.YwFloor; |
| | | import com.doumee.dao.business.model.YwRoom; |
| | |
| | | private YwFloorMapper ywFloorMapper; |
| | | @Autowired |
| | | private YwBuildingMapper ywBuildingMapper; |
| | | @Autowired |
| | | private YwRoomMapper ywRoomMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwFloor model) { |
| | |
| | | |
| | | @Override |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | //查询楼层下的数据 |
| | | if(ywRoomMapper.selectCount(new QueryWrapper<YwRoom>().lambda().eq(YwRoom::getIsdeleted,Constants.ZERO) |
| | | .eq(YwRoom::getFloor,id))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"楼层存在房间数据!"); |
| | | }; |
| | | |
| | | |
| | | YwFloor model = new YwFloor(); |
| | | model.setId(id); |
| | | model.setEditDate(new Date()); |