Commit fe6353ab authored by Quxl's avatar Quxl

x

parent 464820bf
...@@ -60,6 +60,7 @@ public class WebUtilController { ...@@ -60,6 +60,7 @@ public class WebUtilController {
String sql = "select id, enroll_type_name, enroll_type_name_other from fc_member_film"; String sql = "select id, enroll_type_name, enroll_type_name_other from fc_member_film";
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql); List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
List<Fc_member_film_enroll> enrolls = new ArrayList<Fc_member_film_enroll>(); List<Fc_member_film_enroll> enrolls = new ArrayList<Fc_member_film_enroll>();
List<Object[]> objList = new ArrayList<Object[]>();
for(Map<String, Object> map : list) { for(Map<String, Object> map : list) {
Integer id = Util.toInt(map.get("id")); Integer id = Util.toInt(map.get("id"));
String name = (String)map.get("enroll_type_name"); String name = (String)map.get("enroll_type_name");
...@@ -72,10 +73,23 @@ public class WebUtilController { ...@@ -72,10 +73,23 @@ public class WebUtilController {
enrolls.add(enroll); enrolls.add(enroll);
} }
} }
String enroll_type_name_other = (String)map.get("enroll_type_name_other");
if(StringUtil.isNotBlank(enroll_type_name_other)) {
String[] strs = enroll_type_name_other.split(",");
for(String str : strs) {
if(Integer.valueOf(str).intValue() == 1) {
objList.add(new Object[] {(enroll_type_name_other + ",6"), id});
break;
}
}
}
} }
if(enrolls.size() > 0) { if(enrolls.size() > 0) {
jdbcTemplate.batchSave(enrolls); jdbcTemplate.batchSave(enrolls);
} }
if(objList.size() > 0) {
jdbcTemplate.batchUpdate("update fc_member_film set enroll_type_name_other = ? where id = ?", objList);
}
return Rjx.jsonOk(); return Rjx.jsonOk();
} }
......
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