Commit af4628b5 authored by Quxl's avatar Quxl

修改审片API

parent 7e8a5ef3
...@@ -14,9 +14,9 @@ import com.egolm.common.jdbc.Page; ...@@ -14,9 +14,9 @@ import com.egolm.common.jdbc.Page;
import com.egolm.film.api.member.service.MemberService; import com.egolm.film.api.member.service.MemberService;
import com.egolm.film.api.user.service.UserReviewService; import com.egolm.film.api.user.service.UserReviewService;
import com.egolm.film.api.user.service.UserTokenService; import com.egolm.film.api.user.service.UserTokenService;
import com.egolm.film.bean.Fc_film;
import com.egolm.film.bean.Fc_film_doubtful_point; import com.egolm.film.bean.Fc_film_doubtful_point;
import com.egolm.film.bean.Fc_film_review; import com.egolm.film.bean.Fc_film_review;
import com.egolm.film.bean.Fc_member_film;
import com.egolm.film.bean.Fc_member_film_director; import com.egolm.film.bean.Fc_member_film_director;
import com.egolm.film.bean.Fc_member_film_issuer; 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_playactor;
...@@ -38,6 +38,9 @@ public class UserReviewController { ...@@ -38,6 +38,9 @@ public class UserReviewController {
@Autowired @Autowired
private UserReviewService reviewService; private UserReviewService reviewService;
@Autowired
private MemberService memberService;
@ResponseBody @ResponseBody
@PostMapping("review_list") @PostMapping("review_list")
...@@ -74,35 +77,89 @@ public class UserReviewController { ...@@ -74,35 +77,89 @@ public class UserReviewController {
return Rjx.jsonOk().setData(list).setPage(page); return Rjx.jsonOk().setData(list).setPage(page);
} }
@Autowired
private MemberService memberService;
@ResponseBody @ResponseBody
@PostMapping("allot_detail") @PostMapping("member_apply_detail")
@ApiOperation("影片信息详情") @ApiOperation("查询申报影片详细信息")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "film_id", value="影片ID"), @ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "film_id", value="影片ID"),
}) })
public Object getAllotDetail(Long film_id) { public Object getAllotDetail(Long film_id) {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
Map<String, Object> map = reviewService.queryAllotDetailByFilmId(film_id);
Long member_film_id = reviewService.queryMemberFilmIdByFilmId(film_id); Long member_film_id = reviewService.queryMemberFilmIdByFilmId(film_id);
Fc_member_film memberFilm = memberService.queryMemberFilmById(member_film_id);
List<Fc_member_film_director> directorList = memberService.queryMemberFilmDirectorList(member_film_id); List<Fc_member_film_director> directorList = memberService.queryMemberFilmDirectorList(member_film_id);
List<Fc_member_film_issuer> issuerList = memberService.queryMemberFilmIssuerList(member_film_id); List<Fc_member_film_issuer> issuerList = memberService.queryMemberFilmIssuerList(member_film_id);
List<Fc_member_film_playactor> playactorList = memberService.queryMemberFilmPlayactorList(member_film_id); List<Fc_member_film_playactor> playactorList = memberService.queryMemberFilmPlayactorList(member_film_id);
List<Fc_member_film_show> showList = memberService.queryMemberFilmShowList(member_film_id); List<Fc_member_film_show> showList = memberService.queryMemberFilmShowList(member_film_id);
Integer round = (Integer)map.get("round");
List<Fc_film_review> reviewList = reviewService.queryRoundReviewListByUserId(user_id, round, film_id);
List<Fc_film_doubtful_point> doubtfulList = reviewService.queryDoubtfulListByUserId(user_id, film_id);
return Rjx.jsonOk() return Rjx.jsonOk()
.setData(map) .setData(memberFilm)
.set("member_film_id", member_film_id)
.set("directorList", directorList) .set("directorList", directorList)
.set("issuerList", issuerList) .set("issuerList", issuerList)
.set("playactorList", playactorList) .set("playactorList", playactorList)
.set("showList", showList) .set("showList", showList)
.set("reviewList", reviewList) ;
.set("doubtfulList", doubtfulList); }
@ResponseBody
@PostMapping("review_list")
@ApiOperation("查询评审记录列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "film_id", value="影片ID"),
})
public Object getReviewList(Long film_id) {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
Integer round = reviewService.queryRound(user_id, film_id);
List<Fc_film_review> reviewList = reviewService.queryRoundReviewListByUserId(user_id, round, film_id);
return Rjx.jsonOk().setData(reviewList);
}
@ResponseBody
@PostMapping("doubtful_list")
@ApiOperation("查询疑点列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "film_id", value="影片ID"),
})
public Object getDoubtfulList(Long film_id) {
LoginToken loginToken = tokenService.getToken();
Integer user_id = (Integer)loginToken.getId();
List<Fc_film_doubtful_point> doubtfulList = reviewService.queryDoubtfulListByUserId(user_id, film_id);
return Rjx.jsonOk().setData(doubtfulList);
}
@ResponseBody
@PostMapping("doubtful_append")
@ApiOperation("增加疑点")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "film_id", value="影片ID"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "content", value="疑点说明"),
})
public Object doubtfulAppend(Long film_id, String content) {
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("do_reject")
@ApiOperation("审片否决")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "long", required = false, name = "film_id", value="影片ID"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "veto", value="否决理由"),
})
public Object doReject(Long film_id, String veto) {
return Rjx.jsonOk();
}
@ResponseBody
@PostMapping("do_pass")
@ApiOperation("审片通过")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "long", required = true, name = "film_id", value="影片ID"),
@ApiImplicitParam(paramType = "query", dataType = "float", required = true, name = "score", value="评分"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "content", value="选片结论"),
})
public Object doPass(Long film_id, Double score, String content) {
return Rjx.jsonOk();
} }
} }
...@@ -24,4 +24,6 @@ public interface UserReviewService { ...@@ -24,4 +24,6 @@ public interface UserReviewService {
Fc_film queryFilmById(Long film_id); Fc_film queryFilmById(Long film_id);
Integer queryRound(Integer user_id, Long film_id);
} }
...@@ -109,5 +109,10 @@ public class UserReviewServiceImpl implements UserReviewService { ...@@ -109,5 +109,10 @@ public class UserReviewServiceImpl implements UserReviewService {
public Fc_film queryFilmById(Long film_id) { public Fc_film queryFilmById(Long film_id) {
return jdbcTemplate.queryForBean("select * from fc_film where id = ?", Fc_film.class, film_id); return jdbcTemplate.queryForBean("select * from fc_film where id = ?", Fc_film.class, film_id);
} }
@Override
public Integer queryRound(Integer user_id, Long film_id) {
return jdbcTemplate.queryForInt("select round from fc_film_allot where film_id = ? and uid = ?", film_id, user_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