|
@@ -59,9 +59,11 @@ public class FilmController {
|
|
String type = request.getParameter("type")==null?"1":request.getParameter("type").trim();
|
|
String type = request.getParameter("type")==null?"1":request.getParameter("type").trim();
|
|
if(film_code.isEmpty() || type.isEmpty()){
|
|
if(film_code.isEmpty() || type.isEmpty()){
|
|
map.put("code", 301);
|
|
map.put("code", 301);
|
|
|
|
+ map.put("msg", "film_code或type参数错误");
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
filmService.delete(film_code, Integer.valueOf(type));
|
|
filmService.delete(film_code, Integer.valueOf(type));
|
|
|
|
+ recmdService.delete(Integer.valueOf(type), film_code, 0, 0);
|
|
map.put("code", 200);
|
|
map.put("code", 200);
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
@@ -88,9 +90,17 @@ public class FilmController {
|
|
String duration = request.getParameter("duration")==null?"0":request.getParameter("duration").trim();
|
|
String duration = request.getParameter("duration")==null?"0":request.getParameter("duration").trim();
|
|
if(film_code.isEmpty() || type.isEmpty()){
|
|
if(film_code.isEmpty() || type.isEmpty()){
|
|
map.put("code", 301);
|
|
map.put("code", 301);
|
|
|
|
+ map.put("msg", "film_code或type参数错误");
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
int curTime = (int)(System.currentTimeMillis()/1000);
|
|
int curTime = (int)(System.currentTimeMillis()/1000);
|
|
|
|
+
|
|
|
|
+ Film old = filmService.get(film_code, Integer.valueOf(type));
|
|
|
|
+ if(old!=null){
|
|
|
|
+ map.put("code", 302);
|
|
|
|
+ map.put("msg", "节目已存在,不能重复添加");
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
Film film = new Film();
|
|
Film film = new Film();
|
|
film.setType(Integer.valueOf(type));
|
|
film.setType(Integer.valueOf(type));
|
|
film.setAge_group(Integer.valueOf(age_group));
|
|
film.setAge_group(Integer.valueOf(age_group));
|