From c349b9e2d882b5300fb7ddae057257ab264cb902 Mon Sep 17 00:00:00 2001 From: nieziyan Date: Mon, 27 Nov 2023 17:04:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9AconcAvg=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jeecg/common/util/FTPUtil.java | 4 ++++ .../jeecg/modules/mapper/AlarmLogMapper.java | 5 ++++- .../modules/mapper/xml/AlarmLogMapper.xml | 22 +++++++++---------- .../modules/qiyeEmail/api/MailBoxAPI.java | 6 +++++ .../modules/qiyeEmail/service/Account.java | 11 ++++++---- .../modules/qiyeEmail/service/MailBox.java | 22 +++++++++++++++++++ .../service/impl/AlarmLogServiceImpl.java | 13 ++++------- .../service/impl/SysEmailLogServiceImpl.java | 12 ++++++++-- .../service/impl/SysEmailServiceImpl.java | 14 ++++++++++++ .../impl/GardsSampleDataServiceImpl.java | 4 +++- 10 files changed, 84 insertions(+), 29 deletions(-) create mode 100644 jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/qiyeEmail/api/MailBoxAPI.java create mode 100644 jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/qiyeEmail/service/MailBox.java diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java index d650c7c6..66486d14 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java @@ -396,6 +396,10 @@ public class FTPUtil { if (CollUtil.isEmpty(paths)) return failList; // 连接FTP服务 final FTPClient ftpClient = this.LoginFTP(); + if (ObjectUtil.isNull(ftpClient)){ + log.error("FTPUtil.removeFiles(): FTPClient is null"); + return paths; + } for (String path : paths) { try { if (StrUtil.isBlank(path)) continue; diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/AlarmLogMapper.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/AlarmLogMapper.java index aef2ea74..df09811b 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/AlarmLogMapper.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/AlarmLogMapper.java @@ -1,6 +1,8 @@ package org.jeecg.modules.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; import org.jeecg.modules.base.dto.TypeDto; import org.jeecg.modules.base.entity.postgre.AlarmLog; import org.jeecg.modules.entity.AlarmHistory; @@ -12,7 +14,8 @@ import java.util.Map; public interface AlarmLogMapper extends BaseMapper { List rangeDay(Map params); - List findPage(Map params); + + Page findPage(Page page, Map params); List typeAlarms(Map params); diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/AlarmLogMapper.xml b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/AlarmLogMapper.xml index 697e3bbd..26eb10db 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/AlarmLogMapper.xml +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/mapper/xml/AlarmLogMapper.xml @@ -22,7 +22,8 @@ - SELECT * FROM @@ -46,26 +47,23 @@ INNER JOIN alarm_rule r ON l.rule_id = r.ID ) AS res - + source_type IN - + #{item} - - AND NAME LIKE concat ( '%', #{name} , '%' ) + + AND NAME LIKE concat ( '%', #{params.name} , '%' ) - - AND alarm_start_date >= #{startDate} + + AND alarm_start_date >= #{params.startDate} - - AND alarm_start_date <= #{endDate} + + AND alarm_start_date <= #{params.endDate} ORDER BY alarm_start_date DESC - - LIMIT #{pageSize} OFFSET #{pageStart} -