Commit 2f06b551 authored by Quxl's avatar Quxl

x

parent 5abd32b7
...@@ -23,6 +23,7 @@ import com.egolm.film.bean.Fc_review_doubtful; ...@@ -23,6 +23,7 @@ import com.egolm.film.bean.Fc_review_doubtful;
import com.egolm.film.bean.Fc_review_history; import com.egolm.film.bean.Fc_review_history;
import com.egolm.film.bean.Fc_review_record; import com.egolm.film.bean.Fc_review_record;
import com.egolm.film.bean.Fc_review_record_ext; import com.egolm.film.bean.Fc_review_record_ext;
import com.egolm.film.bean.Fc_user;
import com.egolm.film.config.XRException; import com.egolm.film.config.XRException;
import com.egolm.film.util.SqlWhere; import com.egolm.film.util.SqlWhere;
...@@ -623,10 +624,19 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -623,10 +624,19 @@ public class ReviewServiceImpl implements ReviewService {
} }
jdbcTemplate.batchUpdate(sql, objs); jdbcTemplate.batchUpdate(sql, objs);
List<Fc_user> userList = jdbcTemplate.queryForBeans("select * from fc_user where uid in (" + StringUtil.join("?", ", ", user_id.length) + ")", Fc_user.class, (Object[])user_id);
Object[][] objs2 = new Object[user_id.length][]; Object[][] objs2 = new Object[user_id.length][];
for(int i = 0; i < objs2.length; i++) { for(int i = 0; i < objs2.length; i++) {
objs2[i] = new Object[]{review_id, review_round, user_id[i]}; Integer gid = null;
for(Fc_user user : userList) {
if(user.getUid().intValue() == user_id[i].intValue()) {
gid = user.getGroup_id();
}
}
objs2[i] = new Object[]{gid, review_id, review_round, user_id[i]};
} }
jdbcTemplate.batchUpdate("update fc_review_record set user_group_id = ? where review_id = ? and review_round = ? and user_id = ?", objs2); jdbcTemplate.batchUpdate("update fc_review_record set user_group_id = ? where review_id = ? and review_round = ? and user_id = ?", objs2);
jdbcTemplate.executeUpdate("update fc_review set allot_state = 1, opt_state = 0 where id = ? and review_round = ?", review_id, review_round); jdbcTemplate.executeUpdate("update fc_review set allot_state = 1, opt_state = 0 where id = ? and review_round = ?", review_id, review_round);
} }
......
...@@ -138,6 +138,7 @@ public class AdminReviewController { ...@@ -138,6 +138,7 @@ public class AdminReviewController {
} }
@ResponseBody @ResponseBody
@Transactional
@PostMapping("allot") @PostMapping("allot")
@ApiOperation("分配审片评委") @ApiOperation("分配审片评委")
@ApiImplicitParams({ @ApiImplicitParams({
......
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