BedMapper.java 658 B

12345678910111213141516171819
  1. package space.anyi.mapper;
  2. import space.anyi.entity.Bed;
  3. import org.apache.ibatis.annotations.Param;
  4. import java.util.List;
  5. public interface BedMapper {
  6. List<Bed> selectAll();
  7. List<Bed> selectByCondition(@Param("buildingId") Long buildingId,
  8. @Param("roomNumber") String roomNumber);
  9. List<Bed> selectByRoomId(Long roomId);
  10. List<Bed> selectAvailableByRoomId(Long roomId);
  11. Bed selectById(Long id);
  12. int insert(Bed bed);
  13. int update(Bed bed);
  14. int updateStatus(@Param("id") Long id, @Param("status") Integer status);
  15. int deleteById(Long id);
  16. int countActiveAssignmentsByBedId(Long bedId);
  17. }