From a21a875261d047dade727e84ba4d3f78e0f8baad Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Mon, 16 May 2022 18:37:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=9F=B3=E4=B9=90=E5=BA=93?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=B8=93=E8=BE=91=E6=97=B6=E9=99=84=E5=B8=A6?= =?UTF-8?q?md5=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yutou/nas/Services/impl/MusicToolsServiceImpl.java | 4 ++-- .../java/com/yutou/nas/mybatis/dao/MusicDataDao.java | 4 ++-- src/main/resources/mappers/MusicDataDao.xml | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java index 5c40bec..9fad179 100644 --- a/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java +++ b/src/main/java/com/yutou/nas/Services/impl/MusicToolsServiceImpl.java @@ -150,11 +150,11 @@ public class MusicToolsServiceImpl implements IMusicToolsService { - public List getAllAlbum() { + public List getAllAlbum() { return musicDataDao.selectAllAlbum(); } - public List getAllArtist() { + public List getAllArtist() { return musicDataDao.selectAllArtist(); } diff --git a/src/main/java/com/yutou/nas/mybatis/dao/MusicDataDao.java b/src/main/java/com/yutou/nas/mybatis/dao/MusicDataDao.java index 8256054..8399efe 100644 --- a/src/main/java/com/yutou/nas/mybatis/dao/MusicDataDao.java +++ b/src/main/java/com/yutou/nas/mybatis/dao/MusicDataDao.java @@ -34,8 +34,8 @@ public interface MusicDataDao { void truncate(); List selectByRegexp(@Param("regexp")String regexp,@Param("isDelFile")boolean isDelFile); - List selectAllAlbum(); - List selectAllArtist(); + List selectAllAlbum(); + List selectAllArtist(); List selectAlbum(@Param("album")String album,@Param("isDelFile")boolean isDelFile); List selectArtist(@Param("artist")String artist,@Param("isDelFile")boolean isDelFile); diff --git a/src/main/resources/mappers/MusicDataDao.xml b/src/main/resources/mappers/MusicDataDao.xml index 624ffe4..91f031f 100644 --- a/src/main/resources/mappers/MusicDataDao.xml +++ b/src/main/resources/mappers/MusicDataDao.xml @@ -308,13 +308,13 @@ from music_data where `file` REGEXP #{regexp,jdbcType=VARCHAR} - + SELECT album,`md5` + FROM music_data a group by `album`; - + SELECT artist,`md5` FROM music_data group by `artist`;