/* * Copyright (c) 2023. yo-saito. All Rights Reserved. */ package net.piedpiper.bremer.dao import net.piedpiper.bremer.entity.AlbumEntity import net.piedpiper.bremer.entity.AudioPlayHistoryEntity import org.apache.ibatis.annotations.Mapper import org.apache.ibatis.annotations.Param import org.apache.ibatis.annotations.ResultMap import org.apache.ibatis.annotations.Select import org.springframework.stereotype.Repository @Repository("bremer.dao.AlbumDao") @Mapper interface AlbumDao { @ResultMap("net.piedpiper.bremer.AlbumEntity") @Select("SELECT * FROM album WHERE name LIKE CONCAT('%', #{nameLike}, '%') LIMIT #{limit}") fun findAllByNameLikeLimit( @Param("nameLike") nameLike: String, @Param("limit") limit: Int ): List<AlbumEntity> }