feat:PostGreSql
This commit is contained in:
parent
06ba735009
commit
dfe683e59e
|
@ -245,7 +245,7 @@ public class FTPUtil {
|
|||
try {
|
||||
if (ObjectUtil.isNotNull(inputStream))inputStream.close();
|
||||
if (ObjectUtil.isNotNull(outputStream))outputStream.close();
|
||||
ftpClient.disconnect();
|
||||
if (ObjectUtil.isNotNull(ftpClient))ftpClient.disconnect();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -26,5 +26,9 @@ public interface SysDatabaseMapper extends BaseMapper<SysDatabase> {
|
|||
|
||||
List<DBInfo> dbIndexOR(@Param("owner") String dataBase);
|
||||
|
||||
List<DBInfo> dbInfoPG();
|
||||
|
||||
List<DBInfo> dbRowNumPG();
|
||||
|
||||
List<DBInfo> dbInfoMY(@Param("owner") String dataBase);
|
||||
}
|
||||
|
|
|
@ -85,6 +85,13 @@
|
|||
ORDER BY a.table_name
|
||||
</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
|
||||
TABLE_NAME AS tableName,
|
||||
|
|
|
@ -244,6 +244,11 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
|
|||
Map<String, Double> indexSize = baseMapper.dbIndexOR(dataBase).stream()
|
||||
.collect(Collectors.toMap(DBInfo::getTableName, DBInfo::getIndexSize));
|
||||
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();
|
||||
dbInfo.setIndexSize(indexSize.get(tableName));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user