This commit is contained in:
nieziyan 2024-02-05 10:24:32 +08:00
parent a3c7b93572
commit 9e2a90bb51
8 changed files with 39 additions and 6 deletions

View File

@ -372,7 +372,9 @@ public class FTPUtil {
try { try {
if (StrUtil.isBlank(path)) continue; if (StrUtil.isBlank(path)) continue;
boolean success = ftpClient.deleteFile(path); boolean success = ftpClient.deleteFile(path);
if (!success) failList.add(path); if (success) continue;
failList.add(path);
log.error("FTPUtil.removeFiles()删除文件[{}]失败", path);
} catch (Exception e) { } catch (Exception e) {
failList.add(path); failList.add(path);
log.error("FTPUtil.removeFiles()删除文件[{}]失败: {}", path, e.getMessage()); log.error("FTPUtil.removeFiles()删除文件[{}]失败: {}", path, e.getMessage());

View File

@ -8,7 +8,7 @@ import lombok.Getter;
public enum DbItem { public enum DbItem {
DBMEMORY("dbMemory"), DBMEMORY("dbMemory"),
LOGREMAININGSIZE("logRemainingSize"), LOGREMAININGSIZE("logRemainingSize"),
DBSIZE("dblSize"); DBLSIZE("dblSize"), DBSIZE("dbSize");
private final String value; private final String value;
} }

View File

@ -19,7 +19,6 @@ import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.util.JDBCUtil; import org.jeecg.common.util.JDBCUtil;
import org.jeecg.common.util.NumUtil; import org.jeecg.common.util.NumUtil;
import org.jeecg.common.util.RedisUtil; import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.modules.base.dto.*; import org.jeecg.modules.base.dto.*;
import org.jeecg.modules.base.entity.monitor.Host; import org.jeecg.modules.base.entity.monitor.Host;
import org.jeecg.modules.base.entity.monitor.Item; import org.jeecg.modules.base.entity.monitor.Item;
@ -33,7 +32,6 @@ import org.jeecg.modules.feignclient.SystemClient;
import org.jeecg.modules.mapper.DBRowMapper; import org.jeecg.modules.mapper.DBRowMapper;
import org.jeecg.modules.mapper.SpaceRowMapper; import org.jeecg.modules.mapper.SpaceRowMapper;
import org.jeecg.modules.mapper.SysDatabaseMapper; import org.jeecg.modules.mapper.SysDatabaseMapper;
import org.jeecg.modules.service.IAlarmRuleService;
import org.jeecg.modules.service.ISysDatabaseService; import org.jeecg.modules.service.ISysDatabaseService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
@ -129,8 +127,13 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
databaseDto.setLogRemainingSize(NumUtil.byte2Mb(item.getLastValue(), 2)); databaseDto.setLogRemainingSize(NumUtil.byte2Mb(item.getLastValue(), 2));
// dbSize byte -> GB // dbSize byte -> GB
item = itemMap.get(DbItem.DBSIZE.getValue()); item = itemMap.get(DbItem.DBSIZE.getValue());
if (ObjectUtil.isNotNull(item)) if (ObjectUtil.isNotNull(item)){
databaseDto.setDbSize(NumUtil.byte2Gb(item.getLastValue(), 2)); databaseDto.setDbSize(NumUtil.byte2Gb(item.getLastValue(), 2));
}else {
item = itemMap.get(DbItem.DBLSIZE.getValue());
if (ObjectUtil.isNotNull(item))
databaseDto.setDbSize(NumUtil.byte2Gb(item.getLastValue(), 2));
}
} }
page.setRecords(databaseDtos); page.setRecords(databaseDtos);
return Result.OK(page); return Result.OK(page);

View File

@ -1,4 +1,11 @@
package org.jeecg.modules.controller; package org.jeecg.modules.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("")
public class AlarmController { public class AlarmController {
} }

View File

@ -1,4 +1,11 @@
package org.jeecg.modules.controller; package org.jeecg.modules.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("")
public class LoginController { public class LoginController {
} }

View File

@ -1,4 +1,11 @@
package org.jeecg.modules.controller; package org.jeecg.modules.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("")
public class WebController { public class WebController {
} }

View File

@ -1,4 +1,11 @@
package org.jeecg.modules.service; package org.jeecg.modules.service;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
@Component
@FeignClient("armd-system")
public interface LoginService { public interface LoginService {
} }

View File

@ -86,7 +86,7 @@
<module>jeecg-module-spectrum-analysis</module> <module>jeecg-module-spectrum-analysis</module>
<module>jeecg-module-beta-gamma-analyser</module> <module>jeecg-module-beta-gamma-analyser</module>
<module>jeecg-module-app</module> <module>jeecg-module-app</module>
</modules> </modules>
<repositories> <repositories>
<repository> <repository>