Commit 5620df01 authored by Quxl's avatar Quxl

x

parent 8ee8f0ac
package com.egolm.film.api.service;
public interface ReviewService {
Object queryDoubtfulList();
}
package com.egolm.film.api.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.film.api.service.ReviewService;
@Service
public class ReviewServiceImpl implements ReviewService {
@Autowired
JdbcTemplate jdbcTemplate;
@Override
public Object queryDoubtfulList() {
return jdbcTemplate.queryForList("select * from enum_doubtful");
}
}
......@@ -10,6 +10,7 @@ import com.egolm.common.bean.Rjx;
import com.egolm.film.api.service.CountryService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.LanguageService;
import com.egolm.film.api.service.ReviewService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -25,6 +26,9 @@ public class CommonApiController {
@Autowired
private LanguageService languageService;
@Autowired
private ReviewService reviewService;
@Autowired
private FilmService filmService;
......@@ -57,4 +61,11 @@ public class CommonApiController {
return Rjx.jsonOk().setData(filmService.queryTypeList());
}
@ResponseBody
@PostMapping("getDoubtfulList")
@ApiOperation("获取疑点列表")
public Object getDoubtfulList() {
return Rjx.jsonOk().setData(reviewService.queryDoubtfulList());
}
}
package com.egolm.film.bean;
import javax.persistence.Entity;
import javax.persistence.Id;
/**
* @author 曲欣亮
*/
@Entity(name="enum_doubtful")
public class Enum_doubtful implements java.io.Serializable {
private static final long serialVersionUID = 1L;
@Id
private Integer id;
private String doubtful_name;
/**
* 无参数构造方法
*/
public Enum_doubtful () {
super();
}
/**
* 全参数构造方法
* @param id
* @param doubtful_name
*/
public Enum_doubtful(Integer id, String doubtful_name) {
this.id = id;
this.doubtful_name = doubtful_name;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setDoubtful_name(String doubtful_name) {
this.doubtful_name = doubtful_name;
}
public String getDoubtful_name() {
return doubtful_name;
}
}
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