Commit d39f6c8c authored by Quxl's avatar Quxl

x

parent 5177107b
......@@ -96,4 +96,6 @@ public interface ReviewService {
Map<String, Object> queryReviewRecordMapById(Integer record_id);
Integer queryReviewRound(int film_id);
}
\ No newline at end of file
......@@ -681,4 +681,13 @@ public class ReviewServiceImpl implements ReviewService {
return jdbcTemplate.queryForMap("select rr.*, r.enroll_type_id from fc_review_record rr left join fc_review r on r.id = rr.review_id where rr.id = ?", record_id);
}
@Override
public Integer queryReviewRound(int film_id) {
List<Fc_review> reviewList = jdbcTemplate.queryForBeans("select * from fc_review where film_id = ? order by review_time desc limit 1, 1", Fc_review.class, film_id);
if(reviewList != null && reviewList.size() == 1) {
return reviewList.get(0).getReview_round();
}
return null;
}
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.api.service.ExportService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.MemberTokenService;
import com.egolm.film.api.service.ReviewService;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_issuer;
import com.egolm.film.bean.Fc_member_film_playactor;
......@@ -40,7 +41,10 @@ import io.swagger.annotations.ApiOperation;
public class FilmController {
@Autowired
FilmService memberFilmService;
FilmService filmService;
@Autowired
ReviewService reviewService;
@Autowired
ExportService exportService;
......@@ -59,15 +63,17 @@ public class FilmController {
@ApiImplicitParam(paramType="query", dataType="long", required=true, name="member_film_id", value="申报影片ID")
})
public Object getDetail(Long member_film_id) {
Fc_member_film memberFilm = memberFilmService.queryMemberFilmById(member_film_id);
List<Fc_member_film_issuer> issuerList = memberFilmService.queryMemberFilmIssuerList(memberFilm.getId());
List<Fc_member_film_playactor> playactorList = memberFilmService.queryMemberFilmPlayactorList(memberFilm.getId());
List<Fc_member_film_show> showList = memberFilmService.queryMemberFilmShowList(memberFilm.getId());
Fc_member_film memberFilm = filmService.queryMemberFilmById(member_film_id);
List<Fc_member_film_issuer> issuerList = filmService.queryMemberFilmIssuerList(memberFilm.getId());
List<Fc_member_film_playactor> playactorList = filmService.queryMemberFilmPlayactorList(memberFilm.getId());
List<Fc_member_film_show> showList = filmService.queryMemberFilmShowList(memberFilm.getId());
Integer review_round = reviewService.queryReviewRound(member_film_id.intValue());
return Rjx.jsonOk()
.setData(memberFilm)
.set("issuerList", issuerList)
.set("playactorList", playactorList)
.set("showList", showList);
.set("showList", showList)
.set("review_round", review_round);
}
@Transactional
......@@ -89,7 +95,7 @@ public class FilmController {
String[] show_filmfest_type,
String[] show_filmfest_intro) {
memberFilmService.saveMemberFilmShow(
filmService.saveMemberFilmShow(
member_film_id,
play_shanghai,
show_filmfest,
......@@ -117,7 +123,7 @@ public class FilmController {
String[] issuer_email,
String[] issuer_tel) {
memberFilmService.saveMemberFilmIssuer(
filmService.saveMemberFilmIssuer(
member_film_id,
issuer_company,
issuer_contacts,
......@@ -153,7 +159,7 @@ public class FilmController {
String[] playactor_intro,
Integer[] is_play_shanghai) {
memberFilmService.saveMemberFilmPlayactor(
filmService.saveMemberFilmPlayactor(
member_film_id,
playactor_type,
playactor_role_name,
......@@ -171,7 +177,7 @@ public class FilmController {
@ApiOperation("保存电影主要信息")
public Object update_base(Fc_member_film_base_model filmBase) {
boolean isNew = filmBase.getId() == null;
memberFilmService.updateFilmBase(filmBase);
filmService.updateFilmBase(filmBase);
if(isNew) {
Integer admin_id = null;
Integer member_id = null;
......@@ -184,7 +190,7 @@ public class FilmController {
member_id = (Integer)memberToken.getId();
}
String create_ip = WebMvcConfig.getRemoteIp();
memberFilmService.saveCreateBase(filmBase.getId(), admin_id, member_id, create_ip);
filmService.saveCreateBase(filmBase.getId(), admin_id, member_id, create_ip);
}
return Rjx.jsonOk().set("id", filmBase.getId());
}
......
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