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