|
@@ -57,23 +57,23 @@ public class SpaceAndPartitionServiceImpl implements SpaceAndPartitionService {
|
|
|
date,
|
|
|
YearMonth.of(date.getYear() + 1900, date.getMonth() + 1).lengthOfMonth());
|
|
|
System.out.println(tableSpace.get(SpaceEnum.TABLESPACE_SQL.getName()).toString());
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ statement.execute(tableSpace.get(SpaceEnum.TABLESPACE_SQL.getName()).toString());
|
|
|
+ partitionSql.forEach(
|
|
|
+ i -> {
|
|
|
+ try {
|
|
|
+ statement.addBatch(i);
|
|
|
+ } catch (SQLException throwables) {
|
|
|
+ throwables.printStackTrace();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ statement.executeBatch();
|
|
|
+ statement.clearBatch();
|
|
|
partitionSql.forEach(System.out::println);
|
|
|
}
|
|
|
Date lastDate = (Date) tableSpaces.get(tableSpaces.size() - 1).get(SpaceEnum.DATE.getName());
|
|
|
rule.setLastAddTablespaceTime(DateUtils.monthAddNum(lastDate, 1));
|
|
|
rule.setLastAddPartitionTime(DateUtils.dayAddNum(DateUtils.monthAddNum(lastDate, 1), -1));
|
|
|
-
|
|
|
+ ruleService.updateById(rule);
|
|
|
}
|
|
|
|
|
|
@Autowired
|