Commit 0538970b authored by Quxl's avatar Quxl

x

parent 1f4d870c
......@@ -560,28 +560,23 @@ public class FilmServiceImpl implements FilmService {
+ "fc_member_film f2 "
+ "where "
+ "(f.apply_state = 2) "
// + "(f.apply_state = 2 or f.apply_state = 3) "
+ "and (f.en_name = f2.en_name and f.cn_name = f2.cn_name) "
+ "and (((f.en_name = f2.en_name or (f.en_name is null and f2.en_name is null)) and (f.cn_name = f2.cn_name or (f.cn_name is null and f2.cn_name is null))) "
+ "and f2.id = ? "
+ "and f.id != ?";
List<Fc_member_film> list = jdbcTemplate.queryForBeans(sql0, Fc_member_film.class, filmId, filmId);
if(list.size() > 0) {
String sql = ""
+ "select "
+ "count(fp.id) "
+ "from "
+ "fc_member_film_playactor fp, "
+ "fc_member_film_playactor fp2 "
+ "where "
+ "fp.playactor_type = 'director' "
+ "and fp.playactor_type = fp2.playactor_type "
+ "and fp.playactor_name = fp2.playactor_name "
+ "and fp2.film_id = ? "
+ "and fp.film_id != ?";
Integer count = jdbcTemplate.queryForInt(sql, filmId, filmId);
if(count > 0 && count == jdbcTemplate.queryForInt("select count(fp.id) from fc_member_film_playactor fp where fp.playactor_type = 'director' and fp.film_id = ?", filmId)) {
Fc_member_film film = list.get(0);
String sql = "select playactor_name from fc_member_film_playactor where playactor_type = 'director' and film_id = ?";
List<String> directorList = jdbcTemplate.queryForObjects(sql, String.class, filmId);
for(Fc_member_film film : list) {
List<String> directorListTmp = jdbcTemplate.queryForObjects(sql, String.class, film.getId());
if(directorList.size() == directorListTmp.size()) {
boolean boo = true;
for(String director : directorListTmp) {
if(!directorList.contains(director)) {
boo = false;
break;
}
}
if(boo) {
Long passtime = film.getPass_time();
if(passtime == null) {
passtime = film.getLast_modify_time();
......@@ -596,6 +591,7 @@ public class FilmServiceImpl implements FilmService {
}
}
}
}
@Override
public void updateFilmState(Long member_film_id, Integer state) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment