@@ -204,4 +204,33 @@ public class WebUtilController {
...
@@ -204,4 +204,33 @@ public class WebUtilController {
returnRjx.jsonOk();
returnRjx.jsonOk();
}
}
@ResponseBody
@Transactional
@PostMapping("removeFilmData")
@ApiOperation("彻底删除影片数据")
publicObjectremoveFilmData(String[]film_no){
this.verifyAuth();
List<String>nos=newArrayList<String>();
for(Stringno:film_no){
nos.add(Integer.valueOf(no).toString());
}
List<Integer>ids=jdbcTemplate.queryForObjects("select id from fc_member_film where in ("+StringUtil.join(", ","","","''",nos)+")",Integer.class);
List<String>idList=newArrayList<String>();
for(Integerid:ids){
idList.add(id.toString());
}
jdbcTemplate.executeUpdate("delete from fc_review where film_id in ("+StringUtil.join(", ","","","''",idList)+")");
jdbcTemplate.executeUpdate("delete from fc_review_record where review_id in (select id from fc_review where film_id in ("+StringUtil.join(", ","","","''",idList)+"))");
jdbcTemplate.executeUpdate("delete from fc_user_film where review_id in (select id from fc_review where film_id in ("+StringUtil.join(", ","","","''",idList)+"))");
jdbcTemplate.executeUpdate("delete from fc_review_record_ext where record_id in (select id from fc_review_record where review_id in (select id from fc_review where film_id in ("+StringUtil.join(", ","","","''",idList)+")))");
jdbcTemplate.executeUpdate("delete from fc_member_film_playactor where film_id in ("+StringUtil.join(", ","","","''",idList)+")");
jdbcTemplate.executeUpdate("delete from fc_member_film_enroll where film_id in ("+StringUtil.join(", ","","","''",idList)+")");
jdbcTemplate.executeUpdate("delete from fc_member_film_ext where id in ("+StringUtil.join(", ","","","''",idList)+")");
jdbcTemplate.executeUpdate("delete from fc_member_film_issuer where film_id in ("+StringUtil.join(", ","","","''",idList)+")");
jdbcTemplate.executeUpdate("delete from fc_member_film_show where film_id in ("+StringUtil.join(", ","","","''",idList)+")");
jdbcTemplate.executeUpdate("delete from fc_film_upload where film_id in ("+StringUtil.join(", ","","","''",idList)+")");
jdbcTemplate.executeUpdate("delete from fc_member_film where id in ("+StringUtil.join(", ","","","''",idList)+")");