Commit 0538970b authored by Quxl's avatar Quxl

x

parent 1f4d870c
...@@ -560,39 +560,35 @@ public class FilmServiceImpl implements FilmService { ...@@ -560,39 +560,35 @@ public class FilmServiceImpl implements FilmService {
+ "fc_member_film f2 " + "fc_member_film f2 "
+ "where " + "where "
+ "(f.apply_state = 2) " + "(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 (((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 f2.id = ? "
+ "and f.id != ?"; + "and f.id != ?";
List<Fc_member_film> list = jdbcTemplate.queryForBeans(sql0, Fc_member_film.class, filmId, filmId); List<Fc_member_film> list = jdbcTemplate.queryForBeans(sql0, Fc_member_film.class, filmId, filmId);
if(list.size() > 0) { String sql = "select playactor_name from fc_member_film_playactor where playactor_type = 'director' and film_id = ?";
String sql = "" List<String> directorList = jdbcTemplate.queryForObjects(sql, String.class, filmId);
+ "select " for(Fc_member_film film : list) {
+ "count(fp.id) " List<String> directorListTmp = jdbcTemplate.queryForObjects(sql, String.class, film.getId());
+ "from " if(directorList.size() == directorListTmp.size()) {
+ "fc_member_film_playactor fp, " boolean boo = true;
+ "fc_member_film_playactor fp2 " for(String director : directorListTmp) {
+ "where " if(!directorList.contains(director)) {
+ "fp.playactor_type = 'director' " boo = false;
+ "and fp.playactor_type = fp2.playactor_type " break;
+ "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);
Long passtime = film.getPass_time();
if(passtime == null) {
passtime = film.getLast_modify_time();
} }
String no = StringUtil.formatLength(film.getFilm_no(), "0000"); if(boo) {
String str = "通过"; Long passtime = film.getPass_time();
if(film.getApply_state().intValue() == 3) { if(passtime == null) {
str = "否决"; passtime = film.getLast_modify_time();
}
String no = StringUtil.formatLength(film.getFilm_no(), "0000");
String str = "通过";
if(film.getApply_state().intValue() == 3) {
str = "否决";
}
int state = film.getApply_state().intValue();
throw new XRException("该片名已经在" + DateUtil.format(new Date(passtime*1000), "yyyy年MM月dd日HH") + "时被管理员" + str + (state == 2 ? ",通过的影片ID号为" + no : ""));
} }
int state = film.getApply_state().intValue();
throw new XRException("该片名已经在" + DateUtil.format(new Date(passtime*1000), "yyyy年MM月dd日HH") + "时被管理员" + str + (state == 2 ? ",通过的影片ID号为" + no : ""));
} }
} }
} }
......
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