Commit 2f875e49 authored by Quxl's avatar Quxl

x

parent 3bbb44cc
......@@ -115,12 +115,6 @@ public interface FilmService {
void updateEnroll(Long member_film_id);
/**
* 进入下一个审片环节
* @param member_film_id
*/
void toNextRound(Long member_film_id, Integer enroll_type_id);
/**
* 检索审片列表
* @param keyword
......
package com.egolm.film.api.service;
public interface VoteService {
/**
* 进入下一个审片环节
* @param member_film_id
*/
void toNextRound(Long member_film_id, Integer enroll_type_id);
}
......@@ -32,7 +32,6 @@ import com.egolm.film.bean.Fc_member_film_enroll_ext;
import com.egolm.film.bean.Fc_member_film_issuer;
import com.egolm.film.bean.Fc_member_film_playactor;
import com.egolm.film.bean.Fc_member_film_show;
import com.egolm.film.bean.Fc_review;
import com.egolm.film.bean.model.Fc_member_film_base_model;
import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.config.XException;
......@@ -456,24 +455,6 @@ public class FilmServiceImpl implements FilmService {
}
}
@Override
@Transactional
public void toNextRound(Long member_film_id, Integer enroll_type_id) {
try {
Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ?", Fc_review.class, member_film_id, enroll_type_id);
Integer count = jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?", review.getId());
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, review_state = ? where review_id = ?", count > 0 ? 1 : 0, review.getId());
} catch (Exception e) {
Fc_review review = new Fc_review();
review.setEnroll_type_id(enroll_type_id);
review.setFilm_id(member_film_id.intValue());
review.setReview_round(1);
review.setReview_state(0);
review.setCreate_time(new Date());
jdbcTemplate.save(review);
}
}
/**
* 检索审片列表
*/
......
package com.egolm.film.api.service.impl;
import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.film.api.service.VoteService;
import com.egolm.film.bean.Fc_review;
@Service
public class VoteServiceImpl implements VoteService {
@Autowired
JdbcTemplate jdbcTemplate;
@Override
@Transactional
public void toNextRound(Long member_film_id, Integer enroll_type_id) {
try {
Fc_review review = jdbcTemplate.queryForBean("select * from fc_review where film_id = ? and enroll_type_id = ?", Fc_review.class, member_film_id, enroll_type_id);
Integer count = jdbcTemplate.queryForInt("select count(*) from fc_review_record where review_id = ?", review.getId());
jdbcTemplate.executeUpdate("update fc_review set review_round = review_round + 1, review_state = ? where review_id = ?", count > 0 ? 1 : 0, review.getId());
} catch (Exception e) {
Fc_review review = new Fc_review();
review.setEnroll_type_id(enroll_type_id);
review.setFilm_id(member_film_id.intValue());
review.setReview_round(1);
review.setReview_state(0);
review.setCreate_time(new Date());
jdbcTemplate.save(review);
}
}
}
......@@ -22,6 +22,7 @@ import com.egolm.film.api.service.EmailService;
import com.egolm.film.api.service.FilmService;
import com.egolm.film.api.service.MemberService;
import com.egolm.film.api.service.Messages;
import com.egolm.film.api.service.VoteService;
import com.egolm.film.bean.Fc_member;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_enroll;
......@@ -57,6 +58,9 @@ public class AdminFirstController {
@Autowired
Messages messages;
@Autowired
VoteService voteService;
@ResponseBody
@PostMapping("list")
@ApiOperation("初审列表分页查询")
......@@ -118,7 +122,7 @@ public class AdminFirstController {
memberFilmService.pass(member_film_id);
List<Fc_member_film_enroll> enrolls = memberFilmService.queryFilmEnrollList(member_film_id);
for(Fc_member_film_enroll enroll : enrolls) {
memberFilmService.toNextRound(member_film_id, enroll.getEnroll_type_id());
voteService.toNextRound(member_film_id, enroll.getEnroll_type_id());
}
Fc_member_film memberFilm = memberFilmService.queryMemberFilmById(member_film_id);
Fc_member member = memberService.getMemberById(memberFilm.getMember_id());
......
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