|
@@ -7,7 +7,6 @@ import com.sundata.product.rwa.calc.service.implement.extend.UpperMapRowMapper;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
|
|
|
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -86,12 +85,16 @@ public class KingBase2GBaseService {
|
|
|
otherJdbc.update("delete from " + tableName);
|
|
|
int x = 0;
|
|
|
for (Map<String, Object> map : data) {
|
|
|
- otherJdbc.update(sql,new MapSqlParameterSource(map));
|
|
|
- if (x++%10==0){
|
|
|
- otherJdbc.update("commit");
|
|
|
+ otherJdbc.update(sql, new MapSqlParameterSource(map));
|
|
|
+ if (x++ % 10 == 0) {
|
|
|
+ otherJdbc.execute("commit", (o) -> {
|
|
|
+ o.execute();
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
- otherJdbc.update("commit");
|
|
|
+ otherJdbc.execute("commit", (o) -> {
|
|
|
+ o.execute();
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
|