Commit 19fad9d3 authored by Quxl's avatar Quxl

x

parent 1909d582
...@@ -4,21 +4,17 @@ import java.util.ArrayList; ...@@ -4,21 +4,17 @@ import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Hashtable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.egolm.common.DateUtil; import com.egolm.common.DateUtil;
import com.egolm.common.StringUtil; import com.egolm.common.StringUtil;
import com.egolm.common.jdbc.JdbcTemplate; import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page; import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.FilmReportService; import com.egolm.film.api.service.FilmReportService;
import com.egolm.film.util.SqlWhere;
@Service @Service
public class FilmReportServiceImpl implements FilmReportService { public class FilmReportServiceImpl implements FilmReportService {
...@@ -120,7 +116,7 @@ public class FilmReportServiceImpl implements FilmReportService { ...@@ -120,7 +116,7 @@ public class FilmReportServiceImpl implements FilmReportService {
String sql = "select * from (select count(1) count, t.playactor_name playactor_name, max(t.create_time) create_time from (select fmfp.playactor_name, fmf.create_time from fc_member_film_playactor fmfp, fc_member_film fmf where fmfp.film_id = fmf.id order by fmf.create_time desc) t group by t.playactor_name) t2 where t2.playactor_name like ? order by t2.create_time desc"; String sql = "select * from (select count(1) count, t.playactor_name playactor_name, max(t.create_time) create_time from (select fmfp.playactor_name, fmf.create_time from fc_member_film_playactor fmfp, fc_member_film fmf where fmfp.film_id = fmf.id order by fmf.create_time desc) t group by t.playactor_name) t2 where t2.playactor_name like ? order by t2.create_time desc";
List<Map<String, Object>> res = jdbcTemplate.limit(sql, page, "%"+playactor_name+"%"); List<Map<String, Object>> res = jdbcTemplate.limit(sql, page, "%"+playactor_name+"%");
List<String> directors = new ArrayList<>(); List<String> directors = new ArrayList<>();
List<String> placeholders = new ArrayList(); List<String> placeholders = new ArrayList<String>();
for (Map<String, Object> map : res) { for (Map<String, Object> map : res) {
directors.add((String)map.get("playactor_name")); directors.add((String)map.get("playactor_name"));
placeholders.add("?"); placeholders.add("?");
......
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