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 {
if (StrUtil.isBlank(path)) continue;
boolean success = ftpClient.deleteFile(path);
if (!success) failList.add(path);
if (success) continue;
failList.add(path);
log.error("FTPUtil.removeFiles()删除文件[{}]失败", path);
} catch (Exception e) {
failList.add(path);
log.error("FTPUtil.removeFiles()删除文件[{}]失败: {}", path, e.getMessage());

View File

@ -8,7 +8,7 @@ import lombok.Getter;
public enum DbItem {
DBMEMORY("dbMemory"),
LOGREMAININGSIZE("logRemainingSize"),
DBSIZE("dblSize");
DBLSIZE("dblSize"), DBSIZE("dbSize");
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.NumUtil;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.modules.base.dto.*;
import org.jeecg.modules.base.entity.monitor.Host;
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.SpaceRowMapper;
import org.jeecg.modules.mapper.SysDatabaseMapper;
import org.jeecg.modules.service.IAlarmRuleService;
import org.jeecg.modules.service.ISysDatabaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
@ -129,8 +127,13 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
databaseDto.setLogRemainingSize(NumUtil.byte2Mb(item.getLastValue(), 2));
// dbSize byte -> GB
item = itemMap.get(DbItem.DBSIZE.getValue());
if (ObjectUtil.isNotNull(item))
if (ObjectUtil.isNotNull(item)){
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);
return Result.OK(page);

View File

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

View File

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

View File

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

View File

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

View File

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