优化音乐库获取专辑时附带md5值
This commit is contained in:
parent
b63d05a89c
commit
a21a875261
@ -150,11 +150,11 @@ public class MusicToolsServiceImpl implements IMusicToolsService {
|
||||
|
||||
|
||||
|
||||
public List<String> getAllAlbum() {
|
||||
public List<MusicData> getAllAlbum() {
|
||||
return musicDataDao.selectAllAlbum();
|
||||
}
|
||||
|
||||
public List<String> getAllArtist() {
|
||||
public List<MusicData> getAllArtist() {
|
||||
return musicDataDao.selectAllArtist();
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ public interface MusicDataDao {
|
||||
void truncate();
|
||||
List<MusicData> selectByRegexp(@Param("regexp")String regexp,@Param("isDelFile")boolean isDelFile);
|
||||
|
||||
List<String> selectAllAlbum();
|
||||
List<String> selectAllArtist();
|
||||
List<MusicData> selectAllAlbum();
|
||||
List<MusicData> selectAllArtist();
|
||||
List<MusicData> selectAlbum(@Param("album")String album,@Param("isDelFile")boolean isDelFile);
|
||||
List<MusicData> selectArtist(@Param("artist")String artist,@Param("isDelFile")boolean isDelFile);
|
||||
|
||||
|
@ -308,13 +308,13 @@
|
||||
from music_data
|
||||
where `file` REGEXP #{regexp,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<select id="selectAllAlbum" resultType="java.lang.String">
|
||||
SELECT album
|
||||
FROM music_data
|
||||
<select id="selectAllAlbum" resultType="com.yutou.nas.mybatis.model.MusicData">
|
||||
SELECT album,`md5`
|
||||
FROM music_data a
|
||||
group by `album`;
|
||||
</select>
|
||||
<select id="selectAllArtist" resultType="java.lang.String">
|
||||
SELECT artist
|
||||
<select id="selectAllArtist" resultType="com.yutou.nas.mybatis.model.MusicData">
|
||||
SELECT artist,`md5`
|
||||
FROM music_data
|
||||
group by `artist`;
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user