Commit e9545cbb authored by Quxl's avatar Quxl

x

parent eeefcf41
......@@ -26,4 +26,6 @@ public interface ReviewService {
void saveReviewRecord(Fc_review_record ru, List<Fc_review_record_ext> exts);
List<Fc_review_record_ext> queryReviewRecordExtList(Integer record_id);
}
\ No newline at end of file
......@@ -86,7 +86,8 @@ public class ReviewServiceImpl implements ReviewService {
@Override
public Fc_review_record queryReviewRecord(Integer user_id, Integer review_id) {
return jdbcTemplate.queryForBean("select * from fc_review_record where user_id = ? and review_id = ?", Fc_review_record.class, user_id, review_id);
String sql = "select rr.* from fc_review_record rr, fc_review r where rr.user_id = ? and rr.review_id = ? and rr.review_id = r.id and rr.review_round = r.review_round";
return jdbcTemplate.queryForBean(sql, Fc_review_record.class, user_id, review_id);
}
@Override
......@@ -97,4 +98,9 @@ public class ReviewServiceImpl implements ReviewService {
jdbcTemplate.batchSave(exts);
}
@Override
public List<Fc_review_record_ext> queryReviewRecordExtList(Integer record_id) {
return jdbcTemplate.queryForBeans("select * from fc_review_record_ext where record_id = ?", Fc_review_record_ext.class, record_id);
}
}
......@@ -147,4 +147,19 @@ public class UserReviewController {
return Rjx.jsonOk();
}
@ResponseBody
@Transactional
@PostMapping("getReviewRecord")
@ApiOperation("查询审片详情")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "int", required = false, name = "review_id", value="审片ID"),
})
public Object saveReviewRecord(Integer review_id) {
LoginToken token = tokenService.getToken();
Integer user_id = (Integer)token.getId();
Fc_review_record record = service.queryReviewRecord(user_id, review_id);
List<Fc_review_record_ext> extList = service.queryReviewRecordExtList(record.getId());
return Rjx.jsonOk().setData(record).set("exts", extList);
}
}
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