|
@@ -95,16 +95,18 @@ public class AudioController {
|
|
|
|
|
|
@RequestMapping(value = "/insert", method = RequestMethod.POST)
|
|
|
public void Insert(HttpServletRequest request, HttpServletResponse response){
|
|
|
+ String rid = request.getParameter("rid");
|
|
|
String album = request.getParameter("album");
|
|
|
String lesson = request.getParameter("lesson");
|
|
|
String name = request.getParameter("name");
|
|
|
String url = request.getParameter("url");
|
|
|
- if(album==null || name==null && url==null){
|
|
|
+ if(rid==null || album==null || name==null && url==null){
|
|
|
HttpUtil.responseApiCode(request, response, ApiCode.PARAMETER_ERROR);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
Audio audio = new Audio();
|
|
|
+ audio.setIdResource(rid);
|
|
|
audio.setAlbum(album);
|
|
|
if(lesson!=null && lesson.length()>0)
|
|
|
audio.setLesson(Integer.valueOf(lesson));
|