Commit 40128fbb authored by hezhuozhi's avatar hezhuozhi

修复日志表删除

parent 9a00f2fb
......@@ -48,11 +48,11 @@ public class HYGFThirdStationLogServiceImpl implements IHYGFThirdStationLogServi
private void checkAndCreateNewTable(String tableName) {
// 查询当前表的数量
Integer countTable = hygfThirdStationLogMapper.countTable(TABLE_NAME);
Integer countTable = hygfThirdStationLogMapper.countTable(TABLE_NAME + "%");
// 如果表超过7个,删除最旧的表
if (countTable >= reserveDay) {
String oldestTableName = hygfThirdStationLogMapper.getOldestTableName(TABLE_NAME);
String oldestTableName = hygfThirdStationLogMapper.getOldestTableName(TABLE_NAME + "%");
hygfThirdStationLogMapper.dropTable(oldestTableName);
}
......
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