From 99dd30f6392e825851f02906f384b75a9f76c9ac Mon Sep 17 00:00:00 2001 From: nieziyan Date: Tue, 12 Dec 2023 19:31:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=8F=96=E6=B6=88add/update?= =?UTF-8?q?=E6=97=B6=E7=8A=B6=E6=80=81=E6=9B=B4=E6=96=B0,=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E7=BA=BF=E7=A8=8B=E7=8A=B6=E6=80=81=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=A2=91=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/base/dto/DatabaseStatusConn.java | 28 ------------------- .../jeecg/modules/DatabaseStatusManager.java | 2 +- .../org/jeecg/modules/EmailStatusManager.java | 2 +- .../jeecg/modules/ServerStatusManager.java | 2 +- .../SysDatabaseStatusController.java | 17 ----------- .../mapper/DatabaseStatusConnMapper.java | 8 ------ .../mapper/xml/DatabaseStatusConnMapper.xml | 5 ---- .../service/IDatabaseStatusConnService.java | 9 ------ .../impl/DatabaseStatusConnServiceImpl.java | 12 -------- .../service/impl/SysDatabaseServiceImpl.java | 4 +-- .../service/impl/SysEmailServiceImpl.java | 4 +-- .../service/impl/SysServerServiceImpl.java | 6 ++-- 12 files changed, 11 insertions(+), 88 deletions(-) delete mode 100644 jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/DatabaseStatusConn.java delete mode 100644 jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/SysDatabaseStatusController.java delete mode 100644 jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/DatabaseStatusConnMapper.java delete mode 100644 jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/DatabaseStatusConnMapper.xml delete mode 100644 jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IDatabaseStatusConnService.java delete mode 100644 jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/DatabaseStatusConnServiceImpl.java diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/DatabaseStatusConn.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/DatabaseStatusConn.java deleted file mode 100644 index 1cc6c29b..00000000 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/dto/DatabaseStatusConn.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.jeecg.modules.base.dto; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import org.jeecg.common.system.base.entity.JeecgEntity; - -import java.time.LocalDateTime; - -@Data -@TableName("database_status_conn") -public class DatabaseStatusConn extends JeecgEntity { - - // private Double memory; - // - // private Integer loginNum; - - private Integer connNum; - - // private Double respTime; // 单位: 秒(S) - // - // private Double logResidue; // 单位 MB - // - // private Double dataSize; // 单位 MB - - private String databaseId; - - private LocalDateTime collectTime; -} diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/DatabaseStatusManager.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/DatabaseStatusManager.java index 116d1592..086d9941 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/DatabaseStatusManager.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/DatabaseStatusManager.java @@ -51,7 +51,7 @@ public class DatabaseStatusManager { } private void init(){ - sleepTime = 30 * 60 * 1000; // 睡眠时间30min + sleepTime = 5 * 1000; // 睡眠时间5s databaseService = SpringContextUtils.getBean(ISysDatabaseService.class); } } diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/EmailStatusManager.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/EmailStatusManager.java index 20744c38..66934c38 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/EmailStatusManager.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/EmailStatusManager.java @@ -54,7 +54,7 @@ public class EmailStatusManager { } private void init(){ - sleepTime = 30 * 60 * 1000; // 睡眠时间30min + sleepTime = 5 * 1000; // 睡眠时间5s emailService = SpringContextUtils.getBean(ISysEmailService.class); } } diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/ServerStatusManager.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/ServerStatusManager.java index 9b947aa5..607efa6c 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/ServerStatusManager.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/ServerStatusManager.java @@ -45,7 +45,7 @@ public class ServerStatusManager { } private void init(){ - sleepTime = 30 * 60 * 1000; // 睡眠时间30min + sleepTime = 5 * 1000; // 睡眠时间5s serverService = SpringContextUtils.getBean(ISysServerService.class); } } diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/SysDatabaseStatusController.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/SysDatabaseStatusController.java deleted file mode 100644 index 8388153c..00000000 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/SysDatabaseStatusController.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.jeecg.modules.controller; - -import io.swagger.annotations.Api; -import org.jeecg.modules.service.IDatabaseStatusConnService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -@RestController -@RequestMapping("sysDatabaseStatus") -@Api(value = "数据库状态信息管理", tags = "数据库状态信息管理") -public class SysDatabaseStatusController { - - @Autowired - private IDatabaseStatusConnService databaseStatusService; - - -} diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/DatabaseStatusConnMapper.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/DatabaseStatusConnMapper.java deleted file mode 100644 index d6befb28..00000000 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/DatabaseStatusConnMapper.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.jeecg.modules.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.jeecg.modules.base.dto.DatabaseStatusConn; - -public interface DatabaseStatusConnMapper extends BaseMapper { - -} diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/DatabaseStatusConnMapper.xml b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/DatabaseStatusConnMapper.xml deleted file mode 100644 index 308fdffa..00000000 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/DatabaseStatusConnMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IDatabaseStatusConnService.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IDatabaseStatusConnService.java deleted file mode 100644 index 5b4f00a4..00000000 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IDatabaseStatusConnService.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.jeecg.modules.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import org.jeecg.modules.base.dto.DatabaseStatusConn; - -public interface IDatabaseStatusConnService extends IService { - - -} diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/DatabaseStatusConnServiceImpl.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/DatabaseStatusConnServiceImpl.java deleted file mode 100644 index 42048ffd..00000000 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/DatabaseStatusConnServiceImpl.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.jeecg.modules.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.jeecg.modules.base.dto.*; -import org.jeecg.modules.mapper.DatabaseStatusConnMapper; -import org.jeecg.modules.service.IDatabaseStatusConnService; -import org.springframework.stereotype.Service; - -@Service("databaseStatusConnService") -public class DatabaseStatusConnServiceImpl extends ServiceImpl implements IDatabaseStatusConnService { - -} diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysDatabaseServiceImpl.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysDatabaseServiceImpl.java index 1986ec40..94f98b88 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysDatabaseServiceImpl.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysDatabaseServiceImpl.java @@ -130,7 +130,7 @@ public class SysDatabaseServiceImpl extends ServiceImpl i sysEmail.setIsQiye(isQiye(username)); boolean success = save(sysEmail); if (success) { - saveOrUpdateStatus(sysEmail); + // saveOrUpdateStatus(sysEmail); return Result.OK(Prompt.ADD_SUCC); } return Result.error(Prompt.ADD_ERR); @@ -167,7 +167,7 @@ public class SysEmailServiceImpl extends ServiceImpl i sysEmail.setIsQiye(isQiye(username)); boolean success = updateById(sysEmail); if (success) { - saveOrUpdateStatus(sysEmail); + // saveOrUpdateStatus(sysEmail); // 更新邮箱发件服务器到Redis // updateSender(); return Result.OK(Prompt.UPDATE_SUCC); diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysServerServiceImpl.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysServerServiceImpl.java index a04dbad2..823b045b 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysServerServiceImpl.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/SysServerServiceImpl.java @@ -146,7 +146,8 @@ public class SysServerServiceImpl extends ServiceImpl