|
@@ -35,23 +35,8 @@ public class HouseNumberStatusImplDao implements HouseNumberStatusDao {
|
|
|
SqlParameterSource[] params = SqlParameterSourceUtils.createBatch(list.toArray());
|
|
SqlParameterSource[] params = SqlParameterSourceUtils.createBatch(list.toArray());
|
|
|
String insertSql = "INSERT INTO `house_number_status` (`id`, `number_id`, `booking_id`, `close_type`, `remark`, `set_date`, `create_id`, `create_date` , `modify_date` , `status` )" +
|
|
String insertSql = "INSERT INTO `house_number_status` (`id`, `number_id`, `booking_id`, `close_type`, `remark`, `set_date`, `create_id`, `create_date` , `modify_date` , `status` )" +
|
|
|
" VALUES " +
|
|
" VALUES " +
|
|
|
- " (:id,:number_id,:booking_id,:close_type,:remark,:set_date,:create_id,:create_date,:modify_date,:status) ";
|
|
|
|
|
- List<MapSqlParameterSource> houseNumberStatusList = new ArrayList<>();
|
|
|
|
|
- for (HouseNumberStatus h1 : list){
|
|
|
|
|
- MapSqlParameterSource mapSqlParameterSource = new MapSqlParameterSource();
|
|
|
|
|
- mapSqlParameterSource.addValue("id", String.valueOf(UUID.randomUUID()));
|
|
|
|
|
- mapSqlParameterSource.addValue("number_id",h1.getNumberId());
|
|
|
|
|
- mapSqlParameterSource.addValue("booking_id",h1.getBookingId());
|
|
|
|
|
- mapSqlParameterSource.addValue("close_type",h1.getCloseType());
|
|
|
|
|
- mapSqlParameterSource.addValue("remark",h1.getRemark());
|
|
|
|
|
- mapSqlParameterSource.addValue("set_date",h1.getSetDate());
|
|
|
|
|
- mapSqlParameterSource.addValue("create_id", h1.getCreateId());
|
|
|
|
|
- mapSqlParameterSource.addValue("create_date",UUIDUtil.getNewDate());
|
|
|
|
|
- mapSqlParameterSource.addValue("modify_date",UUIDUtil.getNewDate());
|
|
|
|
|
- mapSqlParameterSource.addValue("status",h1.getStatus());
|
|
|
|
|
- houseNumberStatusList.add(mapSqlParameterSource);
|
|
|
|
|
- }
|
|
|
|
|
- int[] m = namedParameterJdbcTemplate.batchUpdate(insertSql,houseNumberStatusList.toArray(new SqlParameterSource[0]));
|
|
|
|
|
|
|
+ " (:id,:numberId,:bookingId,:closeType,:remark,:setDate,:createId,:createDate,:modifyDate,:status) ";
|
|
|
|
|
+ int[] m = namedParameterJdbcTemplate.batchUpdate(insertSql,params);
|
|
|
return m.length;
|
|
return m.length;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|