|
@@ -58,6 +58,7 @@ public class AudioController {
|
|
*/
|
|
*/
|
|
@RequestMapping(value = "/admsearch", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/admsearch", method = RequestMethod.POST)
|
|
public void AdminSearch(HttpServletRequest request, HttpServletResponse response){
|
|
public void AdminSearch(HttpServletRequest request, HttpServletResponse response){
|
|
|
|
+ String idAudio = request.getParameter("idAudio");
|
|
String mediaType = request.getParameter("mediaType");
|
|
String mediaType = request.getParameter("mediaType");
|
|
String name = request.getParameter("name");
|
|
String name = request.getParameter("name");
|
|
String album = request.getParameter("album");
|
|
String album = request.getParameter("album");
|
|
@@ -73,7 +74,11 @@ public class AudioController {
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
Map<String,Object> map = new HashMap<>();
|
|
List<Audio> list = null;
|
|
List<Audio> list = null;
|
|
- if(idGroup!=null && idGroup.length()>0){
|
|
|
|
|
|
+ if(idAudio!=null && idAudio.length()>0){
|
|
|
|
+ Audio audio = audioService.GetOne(Long.valueOf(idAudio));
|
|
|
|
+ list = new ArrayList<Audio>();
|
|
|
|
+ list.add(audio);
|
|
|
|
+ }else if(idGroup!=null && idGroup.length()>0){
|
|
Page<Audio> pageRes = audioService.SearchByIdGroup(Integer.valueOf(mediaType), Long.valueOf(idGroup), Integer.valueOf(page), Integer.valueOf(size));
|
|
Page<Audio> pageRes = audioService.SearchByIdGroup(Integer.valueOf(mediaType), Long.valueOf(idGroup), Integer.valueOf(page), Integer.valueOf(size));
|
|
map.put("data", pageRes.getContent());
|
|
map.put("data", pageRes.getContent());
|
|
map.put("size", pageRes.getNumberOfElements());
|
|
map.put("size", pageRes.getNumberOfElements());
|