Commit 110e5565 authored by Quxl's avatar Quxl

x

parent da7dc205
...@@ -370,7 +370,7 @@ public class FilmServiceImpl implements FilmService { ...@@ -370,7 +370,7 @@ public class FilmServiceImpl implements FilmService {
SqlWhere where = new SqlWhere().eq("mf.state", state).eq("mf.apply_state", apply_state).eq("mf.upload_state", upload_state).lk("mf.enroll_type_name", enroll_type).eq("mf.film_type_name", film_type).eq("mf.film_type_name_short", film_type_short).eq("mf.film_country", film_country); SqlWhere where = new SqlWhere().eq("mf.state", state).eq("mf.apply_state", apply_state).eq("mf.upload_state", upload_state).lk("mf.enroll_type_name", enroll_type).eq("mf.film_type_name", film_type).eq("mf.film_type_name_short", film_type_short).eq("mf.film_country", film_country);
String sql = "select mf.*, ifnull(rv.review_state, 0) review_state, (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 left join fc_review rv on rv.film_id = mf.id" + StringUtil.join(" and ", " where ", "", "", where.getStringList()); String sql = "select mf.*, ifnull(rv.review_state, 0) review_state, (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 left join fc_review rv on rv.film_id = mf.id" + StringUtil.join(" and ", " where ", "", "", where.getStringList());
if(StringUtil.isNotBlank(keyword)) { if(StringUtil.isNotBlank(keyword)) {
sql = "select t.* from (" + sql + ") t where t.director_name like '%" + keyword + "%' and t.en_name like '%" + keyword + "%' and t.cn_name like '%" + keyword + "%'"; sql = "select t.* from (" + sql + ") t where t.director_name like '%" + keyword + "%' or t.en_name like '%" + keyword + "%' or t.cn_name like '%" + keyword + "%'";
} }
Object[] objs = where.getObjectList(); Object[] objs = where.getObjectList();
page.setLimitKey("mf.film_no"); page.setLimitKey("mf.film_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