|
@@ -1,5 +1,6 @@
|
|
|
package cn.efunbox.audio.controller;
|
|
|
|
|
|
+import cn.efunbox.audio.consts.Status;
|
|
|
import cn.efunbox.audio.entity.*;
|
|
|
import cn.efunbox.audio.service.*;
|
|
|
import cn.efunbox.audio.utils.ApiCode;
|
|
@@ -48,8 +49,11 @@ public class AudioController {
|
|
|
public void AdminSearch(HttpServletRequest request, HttpServletResponse response){
|
|
|
String name = request.getParameter("name");
|
|
|
String album = request.getParameter("album");
|
|
|
+ String idGroup = request.getParameter("idGroup");
|
|
|
List<Audio> list = new ArrayList<>();
|
|
|
- if(name!=null && name.length()>0 && album!=null && album.length()>0)
|
|
|
+ if(idGroup!=null && idGroup.length()>0)
|
|
|
+ list = audioService.SearchByIdGroup(Long.valueOf(idGroup));
|
|
|
+ else if(name!=null && name.length()>0 && album!=null && album.length()>0)
|
|
|
list = audioService.SearchByNameAlbum(name, album);
|
|
|
else if(name!=null && name.length()>0)
|
|
|
list = audioService.SearchByName(name);
|
|
@@ -159,6 +163,7 @@ public class AudioController {
|
|
|
HttpUtil.responseApiCode(request, response, ApiCode.PARAMETER_ERROR);
|
|
|
return;
|
|
|
}
|
|
|
+ audio.setStatus(Status.ONLINE.getCode());
|
|
|
audio.setCreated(new Timestamp(new Date().getTime()));
|
|
|
audio = audioService.Insert(audio);
|
|
|
|