Commit 91ab1302 authored by Quxl's avatar Quxl

x

parent 5198612b
......@@ -542,13 +542,10 @@ public class FilmServiceImpl implements FilmService {
@Transactional
public void saveReviewRecordIfNotExists(Integer review_id, Integer review_round, Integer[] user_id) {
String sql = ""
+ "insert into "
+ "fc_review_record"
+ "(review_id, user_id, review_round, view_state, create_time) "
+ "select ?, ?, ?, 0, now() from dual "
+ "insert into fc_review_record"
+ "(review_id, user_id, review_round, view_state, create_time) select ?, ?, ?, 0, now() from dual "
+ "where "
+ "not exists "
+ "(select * from fc_review_record where review_id = ? and user_id = ? and review_round = ?)";
+ "not exists (select * from fc_review_record where review_id = ? and user_id = ? and review_round = ?)";
Object[][] objs = new Object[user_id.length][];
for(int i = 0; i < objs.length; i++) {
objs[i] = new Object[]{review_id, user_id[i], review_round, review_id, user_id[i], review_round};
......
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