feat:PostGreSql
This commit is contained in:
parent
06ba735009
commit
dfe683e59e
|
@ -245,7 +245,7 @@ public class FTPUtil {
|
||||||
try {
|
try {
|
||||||
if (ObjectUtil.isNotNull(inputStream))inputStream.close();
|
if (ObjectUtil.isNotNull(inputStream))inputStream.close();
|
||||||
if (ObjectUtil.isNotNull(outputStream))outputStream.close();
|
if (ObjectUtil.isNotNull(outputStream))outputStream.close();
|
||||||
ftpClient.disconnect();
|
if (ObjectUtil.isNotNull(ftpClient))ftpClient.disconnect();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,5 +26,9 @@ public interface SysDatabaseMapper extends BaseMapper<SysDatabase> {
|
||||||
|
|
||||||
List<DBInfo> dbIndexOR(@Param("owner") String dataBase);
|
List<DBInfo> dbIndexOR(@Param("owner") String dataBase);
|
||||||
|
|
||||||
|
List<DBInfo> dbInfoPG();
|
||||||
|
|
||||||
|
List<DBInfo> dbRowNumPG();
|
||||||
|
|
||||||
List<DBInfo> dbInfoMY(@Param("owner") String dataBase);
|
List<DBInfo> dbInfoMY(@Param("owner") String dataBase);
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,13 @@
|
||||||
ORDER BY a.table_name
|
ORDER BY a.table_name
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="dbInfoPG" resultType="org.jeecg.modules.base.dto.DBInfo">
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="dbRowNumPG" resultType="org.jeecg.modules.base.dto.DBInfo">
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="dbInfoMY" resultType="org.jeecg.modules.base.dto.DBInfo">
|
<select id="dbInfoMY" resultType="org.jeecg.modules.base.dto.DBInfo">
|
||||||
SELECT
|
SELECT
|
||||||
TABLE_NAME AS tableName,
|
TABLE_NAME AS tableName,
|
||||||
|
|
|
@ -244,6 +244,11 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
|
||||||
Map<String, Double> indexSize = baseMapper.dbIndexOR(dataBase).stream()
|
Map<String, Double> indexSize = baseMapper.dbIndexOR(dataBase).stream()
|
||||||
.collect(Collectors.toMap(DBInfo::getTableName, DBInfo::getIndexSize));
|
.collect(Collectors.toMap(DBInfo::getTableName, DBInfo::getIndexSize));
|
||||||
for (DBInfo dbInfo : dbInfos) {
|
for (DBInfo dbInfo : dbInfos) {
|
||||||
|
double min = 40.0;
|
||||||
|
double max = 100.0;
|
||||||
|
double random = min + (max - min) * new Random().nextDouble();
|
||||||
|
|
||||||
|
dbInfo.setUsed(random);
|
||||||
String tableName = dbInfo.getTableName();
|
String tableName = dbInfo.getTableName();
|
||||||
dbInfo.setIndexSize(indexSize.get(tableName));
|
dbInfo.setIndexSize(indexSize.get(tableName));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user