Commit b8abb319 authored by Quxl's avatar Quxl

x

parent 20c28efb
......@@ -8,12 +8,14 @@ import java.util.Map;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import com.egolm.common.StringUtil;
import com.egolm.common.Util;
import com.egolm.common.bean.Rjx;
import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.Page;
import com.egolm.film.api.service.CountryService;
@RestController("webapi")
......@@ -29,11 +31,12 @@ public class WebApiController {
countryMap = countryService.queryCountryMapReverse();
}
@PostMapping("getFilmList")
public Object getFilmList() {
String sql0 = "select mf.id, mf.film_no, mf.cn_name, mf.en_name, mf.film_country, r.enroll_type_id, r.review_state, mf.film_type_name_short from fc_member_film mf left join fc_review r on r.film_id = mf.id, fc_film_group fg where mf.film_group_id = fg.id";
String sql1 = "select * from fc_member_film_ext";
List<Map<String, Object>> filmList = jdbcTemplate.queryForList(sql0);
List<Map<String, Object>> playactorList = jdbcTemplate.queryForList(sql1);
List<Map<String, Object>> filmList = jdbcTemplate.limitAll(sql0, new Page(1L, 1000L, "id desc"));
List<Map<String, Object>> playactorList = jdbcTemplate.limitAll(sql1, new Page(1L, 1000L, "id desc"));
Map<String, Map<String, Object>> playactorMM = Util.listToMM(playactorList, "id");
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
for(Map<String, Object> filmMap : filmList) {
......
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