Commit 28506784 authored by Quxl's avatar Quxl

x

parent 50bab80d
......@@ -115,20 +115,6 @@ public interface FilmService {
void updateEnroll(Long member_film_id);
/**
* 检索审片列表
* @param keyword
* @param film_type_name
* @param film_type_name_short
* @param film_country
* @param review_round
* @param review_state
* @param page
* @return
*/
List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short,
String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer state, Page page);
void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id);
void saveUploadId(Long member_film_id, String upload_id);
......
......@@ -16,6 +16,10 @@ public interface ReviewService {
List<Map<String, Object>> queryReviewList(boolean is_review, Integer user_id, Date start_date, Date end_date, Integer film_type_id, Integer enroll_type_id, String keyword, Page page);
List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name, Integer film_type_name_short,
String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer state, Page page);
Fc_review queryReview(Integer film_id, Integer enroll_type_id);
void saveDoubtful(Fc_review_doubtful doubtful);
......
......@@ -537,72 +537,6 @@ public class FilmServiceImpl implements FilmService {
}
}
/**
* 检索审片列表
*/
@Override
public List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name,
Integer film_type_name_short, String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer state,
Page page) {
SqlWhere w1 = new SqlWhere()
.where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)", new Object[]{group_id})
.eq("mf.upload_state", 1)
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.eq("mf.film_type_name", film_type_name)
.eq("mf.film_type_name_short", film_type_name_short)
.eq("mf.film_country", film_country)
.gt("r.review_round", 0)
.eq("r.review_round", review_round)
.eq("r.enroll_type_id", enroll_type_id)
.eq("r.review_state", review_state)
.eq("r.allot_state", allot_state)
.eq("r.state", state);
//String sql = "select mf.id, mf.film_no, r.id review_id, r.review_round, r.review_state, r.allot_state, r.enroll_type_id, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, (select GROUP_CONCAT(mfd.playactor_name) from fc_member_film_playactor mfd where mfd.film_id = mf.id and mfd.playactor_type = 'director') director_name from fc_member_film mf, fc_review r where r.film_id = mf.id" + StringUtil.join(" and ", " and ", "", "", w1.getStringList());
String sql = ""
+ "select "
+ "mf.id, "
+ "mf.film_no, "
+ "mf.origion_name, "
+ "mf.en_name, "
+ "mf.cn_name, "
+ "mf.film_country, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.upload_state, "
+ "r.id review_id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state, "
+ "r.state, "
+ "r.enroll_type_id, "
+ "(select group_concat(fp.playactor_name) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director' group by fp.film_id, fp.playactor_type) director_name, "
+ "count(rr.id) user_count "
+ "from "
+ "fc_member_film mf, "
+ "fc_review r left join fc_review_record rr on rr.review_id = r.id and rr.review_round = r.review_round "
+ "where "
+ "r.film_id = mf.id "
+ StringUtil.join(" and ", " and ", " ", " ", w1.getStringList())
+ "group by "
+ "mf.id, "
+ "mf.film_no, "
+ "mf.origion_name, "
+ "mf.en_name, "
+ "mf.cn_name, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.film_country, "
+ "r.id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state,"
+ "r.enroll_type_id "
;
return jdbcTemplate.limit(sql, page, w1.getObjectList());
}
@Override
@Transactional
public void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id) {
......
......@@ -73,6 +73,73 @@ public class ReviewServiceImpl implements ReviewService {
return jdbcTemplate.limit(sql, page, where.getObjectList());
}
/**
* 检索审片列表
*/
@Override
public List<Map<String, Object>> queryReviewList(String keyword, Integer group_id, Integer enroll_type_id, Integer film_type_name,
Integer film_type_name_short, String film_country, Integer review_round, Integer review_state, Integer allot_state, Integer state,
Page page) {
SqlWhere w1 = new SqlWhere()
.where("mf.film_type_name in (select agft.film_type_id from fc_admin_group_filmtype agft where agft.group_id = ?)", new Object[]{group_id})
.eq("mf.upload_state", 1)
.lk(new String[]{"mf.en_name", "mf.cn_name"}, keyword)
.eq("mf.film_type_name", film_type_name)
.eq("mf.film_type_name_short", film_type_name_short)
.eq("mf.film_country", film_country)
.gt("r.review_round", 0)
.eq("r.review_round", review_round)
.eq("r.enroll_type_id", enroll_type_id)
.eq("r.review_state", review_state)
.eq("r.allot_state", allot_state)
.eq("r.state", state);
//String sql = "select mf.id, mf.film_no, r.id review_id, r.review_round, r.review_state, r.allot_state, r.enroll_type_id, mf.origion_name, mf.en_name, mf.cn_name, mf.film_type_name, mf.film_country, (select GROUP_CONCAT(mfd.playactor_name) from fc_member_film_playactor mfd where mfd.film_id = mf.id and mfd.playactor_type = 'director') director_name from fc_member_film mf, fc_review r where r.film_id = mf.id" + StringUtil.join(" and ", " and ", "", "", w1.getStringList());
String sql = ""
+ "select "
+ "mf.id, "
+ "mf.film_no, "
+ "mf.origion_name, "
+ "mf.en_name, "
+ "mf.cn_name, "
+ "mf.film_country, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.upload_state, "
+ "r.id review_id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state, "
+ "r.state, "
+ "r.enroll_type_id, "
+ "(select group_concat(fp.playactor_name) from fc_member_film_playactor fp where fp.film_id = mf.id and fp.playactor_type = 'director' group by fp.film_id, fp.playactor_type) director_name, "
+ "count(rr.id) user_count "
+ "from "
+ "fc_member_film mf, "
+ "fc_review r left join fc_review_record rr on rr.review_id = r.id and rr.review_round = r.review_round "
+ "where "
+ "r.film_id = mf.id "
+ StringUtil.join(" and ", " and ", " ", " ", w1.getStringList())
+ "group by "
+ "mf.id, "
+ "mf.film_no, "
+ "mf.origion_name, "
+ "mf.en_name, "
+ "mf.cn_name, "
+ "mf.film_type_name, "
+ "mf.film_type_name_short, "
+ "mf.film_country, "
+ "r.id, "
+ "r.review_round, "
+ "r.review_state, "
+ "r.allot_state,"
+ "r.enroll_type_id "
;
return jdbcTemplate.limit(sql, page, w1.getObjectList());
}
@Override
public Object queryDoubtfulList() {
return jdbcTemplate.queryForList("select * from enum_doubtful");
......
......@@ -56,7 +56,7 @@ public class AdminReviewController {
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
Fc_admin admin = (Fc_admin)tokenService.getTokenObj();
List<Map<String, Object>> list = filmService.queryReviewList(keyword, admin.getGroup_id(), enroll_type_id, film_type_name, film_type_name_short, film_country, review_round, review_state, allot_state, state, page);
List<Map<String, Object>> list = reviewService.queryReviewList(keyword, admin.getGroup_id(), enroll_type_id, film_type_name, film_type_name_short, film_country, review_round, review_state, allot_state, state, page);
return Rjx.jsonOk().setData(list).setPage(page);
}
......
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