Commit 3d0d57c8 authored by Quxl's avatar Quxl

x

parent 6ddda5fe
...@@ -420,6 +420,7 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -420,6 +420,7 @@ public class ReviewServiceImpl implements ReviewService {
Map<String, Object> fields = new HashMap<String, Object>(); Map<String, Object> fields = new HashMap<String, Object>();
String sql = "select rr.user_group_id, rre.ext_type, rre.ext_name, avg(rre.ext_score) ext_score from fc_review_record rr, fc_review_record_ext rre where rre.record_id = rr.id and rr.review_id = " + review_id + " and rr.review_round = " + review_round + " group by rr.user_group_id, rre.ext_type, rre.ext_name"; String sql = "select rr.user_group_id, rre.ext_type, rre.ext_name, avg(rre.ext_score) ext_score from fc_review_record rr, fc_review_record_ext rre where rre.record_id = rr.id and rr.review_id = " + review_id + " and rr.review_round = " + review_round + " group by rr.user_group_id, rre.ext_type, rre.ext_name";
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql); List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
if(list != null && list.size() > 0) {
for(Map<String, Object> map : list) { for(Map<String, Object> map : list) {
Integer user_group_id = (Integer)map.get("user_group_id"); Integer user_group_id = (Integer)map.get("user_group_id");
String ext_type = (String)map.get("ext_type"); String ext_type = (String)map.get("ext_type");
...@@ -466,11 +467,11 @@ public class ReviewServiceImpl implements ReviewService { ...@@ -466,11 +467,11 @@ public class ReviewServiceImpl implements ReviewService {
} catch (Exception e) { } catch (Exception e) {
throw new XException("生成亚新榜单中间结果错误", e); throw new XException("生成亚新榜单中间结果错误", e);
} }
} }
jdbcTemplate.save(asiaNew); jdbcTemplate.save(asiaNew);
} }
} }
}
public void save(Object obj) { public void save(Object obj) {
jdbcTemplate.save(obj); jdbcTemplate.save(obj);
......
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