Kaynağa Gözat

搜索接口增加page,size,pageable分页检索功能

yaobo 7 yıl önce
ebeveyn
işleme
01d58523ef
22 değiştirilmiş dosya ile 167 ekleme ve 56 silme
  1. 8 2
      src/main/java/cn/efunbox/audio/controller/AudioController.java
  2. 7 1
      src/main/java/cn/efunbox/audio/controller/ChannelController.java
  3. 8 2
      src/main/java/cn/efunbox/audio/controller/DeviceController.java
  4. 7 1
      src/main/java/cn/efunbox/audio/controller/GroupingController.java
  5. 10 4
      src/main/java/cn/efunbox/audio/controller/RecordController.java
  6. 9 3
      src/main/java/cn/efunbox/audio/controller/RightsController.java
  7. 10 2
      src/main/java/cn/efunbox/audio/impl/AudioServiceImpl.java
  8. 10 2
      src/main/java/cn/efunbox/audio/impl/ChannelServiceImpl.java
  9. 16 5
      src/main/java/cn/efunbox/audio/impl/DeviceServiceImpl.java
  10. 10 2
      src/main/java/cn/efunbox/audio/impl/GroupingServiceImpl.java
  11. 26 8
      src/main/java/cn/efunbox/audio/impl/RecordServiceImpl.java
  12. 21 6
      src/main/java/cn/efunbox/audio/impl/RightsServiceImpl.java
  13. 4 0
      src/main/java/cn/efunbox/audio/repository/AudioRepo.java
  14. 2 1
      src/main/java/cn/efunbox/audio/repository/DeviceRepo.java
  15. 4 3
      src/main/java/cn/efunbox/audio/repository/RecordRepo.java
  16. 3 2
      src/main/java/cn/efunbox/audio/repository/RightsRepo.java
  17. 1 1
      src/main/java/cn/efunbox/audio/service/AudioService.java
  18. 1 1
      src/main/java/cn/efunbox/audio/service/ChannelService.java
  19. 2 2
      src/main/java/cn/efunbox/audio/service/DeviceService.java
  20. 1 1
      src/main/java/cn/efunbox/audio/service/GroupingService.java
  21. 4 4
      src/main/java/cn/efunbox/audio/service/RecordService.java
  22. 3 3
      src/main/java/cn/efunbox/audio/service/RightsService.java

+ 8 - 2
src/main/java/cn/efunbox/audio/controller/AudioController.java

@@ -55,6 +55,12 @@ public class AudioController {
         String name = request.getParameter("name");
         String album = request.getParameter("album");
         String idGroup = request.getParameter("idGroup");
+        String page = request.getParameter("page");
+        String size = request.getParameter("size");
+        if(page==null || page.length()<1)
+            page = "0";
+        if(size==null || size.length()<1)
+            size = "0";
         List<Audio> list = new ArrayList<>();
         if(idGroup!=null && idGroup.length()>0)
             list = audioService.SearchByIdGroup(Long.valueOf(idGroup));
@@ -65,7 +71,7 @@ public class AudioController {
         else if(album!=null && album.length()>0)
             list = audioService.SearchByAlbum(album);
         else
-            list = audioService.SearchAll();
+            list = audioService.SearchAll(Integer.valueOf(page), Integer.valueOf(size));
 
         HttpUtil.responseOkData(request, response, list);
         return;
@@ -107,7 +113,7 @@ public class AudioController {
         }
         //搜素设备所属渠道具有哪些资源组的权限
         Long idChannel = device.getIdChannel();
-        List<Rights> rightsList = rightsService.SearchByIdChannel(idChannel);
+        List<Rights> rightsList = rightsService.SearchByIdChannel(idChannel, 0, 0);
         if(rightsList==null || rightsList.size()<1){
             HttpUtil.responseApiCode(request, response, ApiCode.ACCESS_DENIED);
             return;

+ 7 - 1
src/main/java/cn/efunbox/audio/controller/ChannelController.java

@@ -35,6 +35,12 @@ public class ChannelController {
         String name = request.getParameter("name");
         String idChannel = request.getParameter("idChannel");
         String idFather = request.getParameter("idFather");
+        String page = request.getParameter("page");
+        String size = request.getParameter("size");
+        if(page==null || page.length()<1)
+            page = "0";
+        if(size==null || size.length()<1)
+            size = "0";
         List<Channel> list = null;
         if(idChannel!=null && idChannel.length()>0)
             list = channelService.SearchById(Long.valueOf(idChannel));
@@ -43,7 +49,7 @@ public class ChannelController {
         else if(idFather!=null && idFather.length()>0)
             list = channelService.SearchByIdFather(Long.valueOf(idFather));
         else
-            list = channelService.SearchAll();
+            list = channelService.SearchAll(Integer.valueOf(page), Integer.valueOf(size));
 
         HttpUtil.responseOkData(request, response, list);
         return;

+ 8 - 2
src/main/java/cn/efunbox/audio/controller/DeviceController.java

@@ -222,15 +222,21 @@ public class DeviceController {
     public void Search(HttpServletRequest request, HttpServletResponse response){
         String idDevice = request.getParameter("idDevice");
         String idChannel = request.getParameter("idChannel");
+        String page = request.getParameter("page");
+        String size = request.getParameter("size");
+        if(page==null || page.length()<1)
+            page = "0";
+        if(size==null || size.length()<1)
+            size = "0";
         List<Device> list = new ArrayList<>();
         if((idDevice==null || idDevice.length()==0) && (idChannel==null || idChannel.length()==0))
-            list = deviceService.SearchAll();
+            list = deviceService.SearchAll(Integer.valueOf(page), Integer.valueOf(size));
         else{
             if(idDevice==null || idDevice.length()==0)
                 idDevice = "0";
             if(idChannel==null || idChannel.length()==0)
                 idChannel = "0";
-            list = deviceService.Search(Long.valueOf(idChannel), Long.valueOf(idDevice));
+            list = deviceService.Search(Long.valueOf(idChannel), Long.valueOf(idDevice), Integer.valueOf(page), Integer.valueOf(size));
         }
 
         for(int i=0; i<list.size(); i++){

+ 7 - 1
src/main/java/cn/efunbox/audio/controller/GroupingController.java

@@ -36,6 +36,12 @@ public class GroupingController {
         String name = request.getParameter("name");
         String idGroup = request.getParameter("idGroup");
         String idFather = request.getParameter("idFather");
+        String page = request.getParameter("page");
+        String size = request.getParameter("size");
+        if(page==null || page.length()<1)
+            page = "0";
+        if(size==null || size.length()<1)
+            size = "0";
 //        if(name==null && idGroup==null && idFather==null){
 //            HttpUtil.responseApiCode(request, response, ApiCode.PARAMETER_ERROR);
 //            return;
@@ -48,7 +54,7 @@ public class GroupingController {
         else if(idFather!=null && idFather.length()>0)
             list = groupingService.SearchByIdFather(Long.valueOf(idFather));
         else
-            list = groupingService.SearchAll();
+            list = groupingService.SearchAll(Integer.valueOf(page), Integer.valueOf(size));
 //
 //        if(list==null || list.size()<1){
 //            HttpUtil.responseApiCode(request, response, ApiCode.NOT_FOUND);

+ 10 - 4
src/main/java/cn/efunbox/audio/controller/RecordController.java

@@ -32,6 +32,12 @@ public class RecordController {
         String idChannel = request.getParameter("idChannel");
         String idDevice = request.getParameter("idDevice");
         String idAudio = request.getParameter("idAudio");
+        String page = request.getParameter("page");
+        String size = request.getParameter("size");
+        if(page==null || page.length()<1)
+            page = "0";
+        if(size==null || size.length()<1)
+            size = "0";
 //        if(idRecord==null && idChannel==null && idDevice==null && idAudio==null){
 //            HttpUtil.responseApiCode(request, response, ApiCode.PARAMETER_ERROR);
 //            return;
@@ -40,13 +46,13 @@ public class RecordController {
         if(idRecord!=null && idRecord.length()>0)
             list = recordService.SearchById(Long.valueOf(idRecord));
         else if(idChannel!=null && idChannel.length()>0)
-            list = recordService.SearchByIdChannel(Long.valueOf(idChannel));
+            list = recordService.SearchByIdChannel(Long.valueOf(idChannel), Integer.valueOf(page), Integer.valueOf(size));
         else if(idDevice!=null && idDevice.length()>0)
-            list = recordService.SearchByIdDevice(Long.valueOf(idDevice));
+            list = recordService.SearchByIdDevice(Long.valueOf(idDevice), Integer.valueOf(page), Integer.valueOf(size));
         else if(idAudio!=null && idAudio.length()>0)
-            list = recordService.SearchByIdAudio(Long.valueOf(idAudio));
+            list = recordService.SearchByIdAudio(Long.valueOf(idAudio), Integer.valueOf(page), Integer.valueOf(size));
         else
-            list = recordService.SearchAll();
+            list = recordService.SearchAll(Integer.valueOf(page), Integer.valueOf(size));
 
 //        if(list==null || list.size()<1){
 //            HttpUtil.responseApiCode(request, response, ApiCode.NOT_FOUND);

+ 9 - 3
src/main/java/cn/efunbox/audio/controller/RightsController.java

@@ -45,6 +45,12 @@ public class RightsController {
         String idRights = request.getParameter("idRights");
         String idChannel = request.getParameter("idChannel");
         String idGroup = request.getParameter("idGroup");
+        String page = request.getParameter("page");
+        String size = request.getParameter("size");
+        if(page==null || page.length()<1)
+            page = "0";
+        if(size==null || size.length()<1)
+            size = "0";
 //        if(idRights==null && idChannel==null && idGroup==null){
 //            HttpUtil.responseApiCode(request, response, ApiCode.PARAMETER_ERROR);
 //            return;
@@ -55,11 +61,11 @@ public class RightsController {
         else if(idChannel!=null && idChannel.length()>0 && idGroup!=null && idGroup.length()>0)
             list = rightsService.SearchByIdChannelAndIdGroup(Long.valueOf(idChannel), Long.valueOf(idGroup));
         else if(idChannel!=null && idChannel.length()>0)
-            list = rightsService.SearchByIdChannel(Long.valueOf(idChannel));
+            list = rightsService.SearchByIdChannel(Long.valueOf(idChannel), Integer.valueOf(page), Integer.valueOf(size));
         else if(idGroup!=null && idGroup.length()>0)
-            list = rightsService.SearchByIdGroup(Long.valueOf(idGroup));
+            list = rightsService.SearchByIdGroup(Long.valueOf(idGroup), Integer.valueOf(page), Integer.valueOf(size));
         else
-            list = rightsService.SearchAll();
+            list = rightsService.SearchAll(Integer.valueOf(page), Integer.valueOf(size));
 
 //        if(list==null || list.size()<1){
 //            HttpUtil.responseApiCode(request, response, ApiCode.NOT_FOUND);

+ 10 - 2
src/main/java/cn/efunbox/audio/impl/AudioServiceImpl.java

@@ -7,8 +7,11 @@ import cn.efunbox.audio.repository.DeviceRepo;
 import cn.efunbox.audio.service.AudioService;
 import cn.efunbox.audio.service.DeviceService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
@@ -29,8 +32,13 @@ public class AudioServiceImpl implements AudioService {
     }
 
     @Override
-    public List<Audio> SearchAll(){
-        List<Audio> list = audioRepo.findAll();
+    public List<Audio> SearchAll(int page, int size){
+        List<Audio> list = new ArrayList<>();
+        if(size > 0){
+            Pageable pageable = new PageRequest(page, size);
+            list = audioRepo.findAll(pageable).getContent();
+        }else
+            list = audioRepo.findAll();
         return list;
     }
 

+ 10 - 2
src/main/java/cn/efunbox/audio/impl/ChannelServiceImpl.java

@@ -7,8 +7,11 @@ import cn.efunbox.audio.repository.ChannelRepo;
 import cn.efunbox.audio.service.AudioService;
 import cn.efunbox.audio.service.ChannelService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -27,8 +30,13 @@ public class ChannelServiceImpl implements ChannelService {
     }
 
     @Override
-    public List<Channel> SearchAll(){
-        List<Channel> list = channelRepo.findAll();
+    public List<Channel> SearchAll(int page, int size){
+        List<Channel> list = new ArrayList<>();
+        if(size > 0){
+            Pageable pageable = new PageRequest(page, size);
+            list = channelRepo.findAll(pageable).getContent();
+        }else
+            list = channelRepo.findAll();
         return list;
     }
 

+ 16 - 5
src/main/java/cn/efunbox/audio/impl/DeviceServiceImpl.java

@@ -1,10 +1,13 @@
 package cn.efunbox.audio.impl;
 
 import cn.efunbox.audio.consts.Status;
+import cn.efunbox.audio.entity.Channel;
 import cn.efunbox.audio.entity.Device;
 import cn.efunbox.audio.repository.DeviceRepo;
 import cn.efunbox.audio.service.DeviceService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
 import java.sql.Timestamp;
@@ -76,20 +79,28 @@ public class DeviceServiceImpl implements DeviceService {
     }
 
     @Override
-    public List<Device> Search(Long idChannel, Long idDevice){
+    public List<Device> Search(Long idChannel, Long idDevice, int page, int size){
+        if(size<=0)
+            size = 100;
+        Pageable pageable = new PageRequest(page, size);
         List<Device> list = new ArrayList<>();
         if(idChannel>0)
-            list = deviceRepo.findByIdChannel(idChannel);
+            list = deviceRepo.findByIdChannel(idChannel, pageable);
         else if(idDevice>0)
             list = deviceRepo.findByIdDevice(idDevice);
         else
-            list = deviceRepo.findAll();
+            list = deviceRepo.findAll(pageable).getContent();
         return list;
     }
 
     @Override
-    public List<Device> SearchAll(){
-        List<Device> list = deviceRepo.findAll();
+    public List<Device> SearchAll(int page, int size){
+        List<Device> list = new ArrayList<>();
+        if(size > 1){
+            Pageable pageable = new PageRequest(page, size);
+            list = deviceRepo.findAll(pageable).getContent();
+        }else
+            list = deviceRepo.findAll();
         return list;
     }
 

+ 10 - 2
src/main/java/cn/efunbox/audio/impl/GroupingServiceImpl.java

@@ -7,8 +7,11 @@ import cn.efunbox.audio.repository.GroupingRepo;
 import cn.efunbox.audio.service.ChannelService;
 import cn.efunbox.audio.service.GroupingService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -27,8 +30,13 @@ public class GroupingServiceImpl implements GroupingService {
     }
 
     @Override
-    public List<Grouping> SearchAll(){
-        List<Grouping> list = groupingRepo.findAll();
+    public List<Grouping> SearchAll(int page, int size){
+        List<Grouping> list = new ArrayList<>();
+        if(size > 0){
+            Pageable pageable = new PageRequest(page, size);
+            list = groupingRepo.findAll(pageable).getContent();
+        }else
+            list = groupingRepo.findAll();
         return list;
     }
 

+ 26 - 8
src/main/java/cn/efunbox/audio/impl/RecordServiceImpl.java

@@ -1,14 +1,18 @@
 package cn.efunbox.audio.impl;
 
 import cn.efunbox.audio.entity.Audio;
+import cn.efunbox.audio.entity.Grouping;
 import cn.efunbox.audio.entity.Record;
 import cn.efunbox.audio.repository.AudioRepo;
 import cn.efunbox.audio.repository.RecordRepo;
 import cn.efunbox.audio.service.AudioService;
 import cn.efunbox.audio.service.RecordService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -21,8 +25,13 @@ public class RecordServiceImpl implements RecordService {
     RecordRepo recordRepo;
 
     @Override
-    public List<Record> SearchAll(){
-        List<Record> list = recordRepo.findAll();
+    public List<Record> SearchAll(int page, int size){
+        List<Record> list = new ArrayList<>();
+        if(size > 0){
+            Pageable pageable = new PageRequest(page, size);
+            list = recordRepo.findAll(pageable).getContent();
+        }else
+            list = recordRepo.findAll();
         return list;
     }
 
@@ -33,20 +42,29 @@ public class RecordServiceImpl implements RecordService {
     }
 
     @Override
-    public List<Record> SearchByIdChannel(Long id){
-        List<Record> list = recordRepo.findByIdChannel(id);
+    public List<Record> SearchByIdChannel(Long id, int page, int size){
+        if(size<=0)
+            size = 100;
+        Pageable pageable = new PageRequest(page, size);
+        List<Record> list = recordRepo.findByIdChannel(id, pageable);
         return list;
     }
 
     @Override
-    public List<Record> SearchByIdDevice(Long id){
-        List<Record> list = recordRepo.findByIdDevice(id);
+    public List<Record> SearchByIdDevice(Long id, int page, int size){
+        if(size<=0)
+            size = 100;
+        Pageable pageable = new PageRequest(page, size);
+        List<Record> list = recordRepo.findByIdDevice(id, pageable);
         return list;
     }
 
     @Override
-    public List<Record> SearchByIdAudio(Long id){
-        List<Record> list = recordRepo.findByIdAudio(id);
+    public List<Record> SearchByIdAudio(Long id, int page, int size){
+        if(size<=0)
+            size = 100;
+        Pageable pageable = new PageRequest(page, size);
+        List<Record> list = recordRepo.findByIdAudio(id, pageable);
         return list;
     }
 

+ 21 - 6
src/main/java/cn/efunbox/audio/impl/RightsServiceImpl.java

@@ -1,14 +1,18 @@
 package cn.efunbox.audio.impl;
 
 import cn.efunbox.audio.entity.Channel;
+import cn.efunbox.audio.entity.Record;
 import cn.efunbox.audio.entity.Rights;
 import cn.efunbox.audio.repository.ChannelRepo;
 import cn.efunbox.audio.repository.RightsRepo;
 import cn.efunbox.audio.service.ChannelService;
 import cn.efunbox.audio.service.RightsService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -27,8 +31,13 @@ public class RightsServiceImpl implements RightsService {
     }
 
     @Override
-    public List<Rights> SearchAll(){
-        List<Rights> list = rightsRepo.findAll();
+    public List<Rights> SearchAll(int page, int size){
+        List<Rights> list = new ArrayList<>();
+        if(size > 0){
+            Pageable pageable = new PageRequest(page, size);
+            list = rightsRepo.findAll(pageable).getContent();
+        }else
+            list = rightsRepo.findAll();
         return list;
     }
 
@@ -39,14 +48,20 @@ public class RightsServiceImpl implements RightsService {
     }
 
     @Override
-    public List<Rights> SearchByIdChannel(Long id){
-        List<Rights> list = rightsRepo.findByIdChannel(id);
+    public List<Rights> SearchByIdChannel(Long id, int page, int size){
+        if(size<=0)
+            size = 100;
+        Pageable pageable = new PageRequest(page, size);
+        List<Rights> list = rightsRepo.findByIdChannel(id, pageable);
         return list;
     }
 
     @Override
-    public List<Rights> SearchByIdGroup(Long id){
-        List<Rights> list = rightsRepo.findByIdGroup(id);
+    public List<Rights> SearchByIdGroup(Long id, int page, int size){
+        if(size<=0)
+            size = 100;
+        Pageable pageable = new PageRequest(page, size);
+        List<Rights> list = rightsRepo.findByIdGroup(id, pageable);
         return list;
     }
 

+ 4 - 0
src/main/java/cn/efunbox/audio/repository/AudioRepo.java

@@ -2,6 +2,8 @@ package cn.efunbox.audio.repository;
 
 import cn.efunbox.audio.entity.Audio;
 import cn.efunbox.audio.entity.Device;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
@@ -17,6 +19,8 @@ public interface AudioRepo extends JpaRepository<Audio, Long> {
 
     Audio findById(Long id);
 
+    Page<Audio> findAll(Pageable pageable);
+
     List<Audio> findByName(String name);
 
     @Query("from Audio a where a.name LIKE :name")

+ 2 - 1
src/main/java/cn/efunbox/audio/repository/DeviceRepo.java

@@ -1,6 +1,7 @@
 package cn.efunbox.audio.repository;
 
 import cn.efunbox.audio.entity.Device;
+import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
@@ -16,7 +17,7 @@ public interface DeviceRepo extends JpaRepository<Device, Long> {
 
     Device findById(Long id);
     List<Device> findByIdDevice(Long idDevice);
-    List<Device> findByIdChannel(Long idChannel);
+    List<Device> findByIdChannel(Long idChannel, Pageable pageable);
 
     @Query("from Device d where d.idDevice=:idDevice")
     List<Device> findByDevice(@Param("idDevice")String idDevice);

+ 4 - 3
src/main/java/cn/efunbox/audio/repository/RecordRepo.java

@@ -2,6 +2,7 @@ package cn.efunbox.audio.repository;
 
 import cn.efunbox.audio.entity.Audio;
 import cn.efunbox.audio.entity.Record;
+import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
@@ -17,10 +18,10 @@ public interface RecordRepo extends JpaRepository<Record, Long> {
 
     List<Record> findById(Long id);
 
-    List<Record> findByIdChannel(Long id);
+    List<Record> findByIdChannel(Long id, Pageable pageable);
 
-    List<Record> findByIdDevice(Long id);
+    List<Record> findByIdDevice(Long id, Pageable pageable);
 
-    List<Record> findByIdAudio(Long id);
+    List<Record> findByIdAudio(Long id, Pageable pageable);
 
 }

+ 3 - 2
src/main/java/cn/efunbox/audio/repository/RightsRepo.java

@@ -2,6 +2,7 @@ package cn.efunbox.audio.repository;
 
 import cn.efunbox.audio.entity.Channel;
 import cn.efunbox.audio.entity.Rights;
+import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
 
@@ -14,8 +15,8 @@ import java.util.List;
 public interface RightsRepo extends JpaRepository<Rights, Long> {
 
     public List<Rights> findById(Long id);
-    public List<Rights> findByIdChannel(Long idChannel);
-    public List<Rights> findByIdGroup(Long idGroup);
+    public List<Rights> findByIdChannel(Long idChannel, Pageable pageable);
+    public List<Rights> findByIdGroup(Long idGroup, Pageable pageable);
     public List<Rights> findByIdChannelAndIdGroup(Long idChannel, Long idGroup);
     public List<Rights> findByNameChannel(String nameChannel);
     public List<Rights> findByNameGroup(String nameGroup);

+ 1 - 1
src/main/java/cn/efunbox/audio/service/AudioService.java

@@ -12,7 +12,7 @@ public interface AudioService {
 
     public Audio GetOne(Long id);
 
-    public List<Audio> SearchAll();
+    public List<Audio> SearchAll(int page, int size);
 
     public List<Audio> SearchByIdGroup(Long idGroup);
 

+ 1 - 1
src/main/java/cn/efunbox/audio/service/ChannelService.java

@@ -12,7 +12,7 @@ public interface ChannelService {
 
     public Channel GetOne(Long id);
 
-    public List<Channel> SearchAll();
+    public List<Channel> SearchAll(int page, int size);
 
     public List<Channel> SearchById(Long id);
 

+ 2 - 2
src/main/java/cn/efunbox/audio/service/DeviceService.java

@@ -17,9 +17,9 @@ public interface DeviceService {
 
     public Device GetOne(Long id);
 
-    public List<Device> Search(Long idChannel, Long idDevice);
+    public List<Device> Search(Long idChannel, Long idDevice, int page, int size);
 
-    public List<Device> SearchAll();
+    public List<Device> SearchAll(int page, int size);
 
     public Device Update(Device device);
 

+ 1 - 1
src/main/java/cn/efunbox/audio/service/GroupingService.java

@@ -12,7 +12,7 @@ public interface GroupingService {
 
     public Grouping GetOne(Long id);
 
-    public List<Grouping> SearchAll();
+    public List<Grouping> SearchAll(int page, int size);
 
     public List<Grouping> SearchById(Long id);
 

+ 4 - 4
src/main/java/cn/efunbox/audio/service/RecordService.java

@@ -10,15 +10,15 @@ import java.util.List;
  */
 public interface RecordService {
 
-    public List<Record> SearchAll();
+    public List<Record> SearchAll(int page, int size);
 
     public List<Record> SearchById(Long id);
 
-    public List<Record> SearchByIdChannel(Long id);
+    public List<Record> SearchByIdChannel(Long id, int page, int size);
 
-    public List<Record> SearchByIdDevice(Long id);
+    public List<Record> SearchByIdDevice(Long id, int page, int size);
 
-    public List<Record> SearchByIdAudio(Long id);
+    public List<Record> SearchByIdAudio(Long id, int page, int size);
 
     public Record Insert(Record record);
 

+ 3 - 3
src/main/java/cn/efunbox/audio/service/RightsService.java

@@ -12,13 +12,13 @@ public interface RightsService {
 
     public Rights GetOne(Long id);
 
-    public List<Rights> SearchAll();
+    public List<Rights> SearchAll(int page, int size);
 
     public List<Rights> SearchById(Long id);
 
-    public List<Rights> SearchByIdChannel(Long id);
+    public List<Rights> SearchByIdChannel(Long id, int page, int size);
 
-    public List<Rights> SearchByIdGroup(Long id);
+    public List<Rights> SearchByIdGroup(Long id, int page, int size);
 
     public List<Rights> SearchByIdChannelAndIdGroup(Long idChannel, Long idGroup);