Stringsql="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());
Stringsql="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)){
sql="select t.* from ("+sql+") t where t.director_name like '%"+keyword+"%'";