From 2d28a7d005efd4ae97ec9f437b7dd5c0c636499e Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Fri, 21 Jul 2023 10:17:09 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java index b5a09484..e21c084f 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java @@ -101,6 +101,7 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl userIds = alarmContactGroup.getUserIds(); for (String userId:userIds) { From 42c9bf9beaad0728c92fc468d9eb4634d387e2e2 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Fri, 21 Jul 2023 10:41:12 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E4=BA=BA=E7=BB=84=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AlarmContactGroupServiceImpl.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java index e21c084f..76c3d6aa 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java @@ -69,6 +69,8 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl userList = systemClient.findUserMap(); //根据id查询对应的数据 判断数据是否在数据库中 LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(AlarmContactGroup::getId, id); @@ -84,6 +86,16 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl userIds = contactGroupMembers.stream().map(AlarmContactGroupMember::getUserId).collect(Collectors.toList()); alarmContactGroup.setUserIds(userIds); + //根据用户id获得对应的用户信息 + List sysUsers = new LinkedList<>(); + if (CollectionUtils.isNotEmpty(userList)){ + for (String userId:userIds) { + if (userList.containsKey(userId)){ + sysUsers.add(userList.get(userId)); + } + } + } + alarmContactGroup.setUsers(sysUsers); } result.setSuccess(true); result.setResult(alarmContactGroup); From 4b113079ca584c4114f9c648c156f17006e1bae2 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Fri, 21 Jul 2023 10:53:47 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E4=BA=BA=E8=81=94=E7=B3=BB=E4=BA=BA=E7=BB=84?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E7=8B=AC=E8=81=94=E7=B3=BB=E4=BA=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AlarmContactGroupController.java | 6 +++++ .../service/IAlarmContactGroupService.java | 2 ++ .../impl/AlarmContactGroupServiceImpl.java | 24 +++++++++---------- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/AlarmContactGroupController.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/AlarmContactGroupController.java index 0d2981dc..25640db7 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/AlarmContactGroupController.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/controller/AlarmContactGroupController.java @@ -45,4 +45,10 @@ public class AlarmContactGroupController { return alarmContactGroupService.deleteById(id); } + @DeleteMapping("deleteUserById") + @ApiOperation(value = "删除报警人联系人组下单独联系人", notes = "删除报警联系人组下单独联系人") + public Result deleteUserById(String id, String userId){ + return alarmContactGroupService.deleteUserById(id, userId); + } + } diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IAlarmContactGroupService.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IAlarmContactGroupService.java index 8bb41e4a..7ce6721f 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IAlarmContactGroupService.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/IAlarmContactGroupService.java @@ -17,4 +17,6 @@ public interface IAlarmContactGroupService extends IService { Result deleteById(String id); + Result deleteUserById(String id, String userId); + } diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java index 76c3d6aa..bb2dcc68 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java @@ -69,8 +69,6 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl userList = systemClient.findUserMap(); //根据id查询对应的数据 判断数据是否在数据库中 LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(AlarmContactGroup::getId, id); @@ -86,16 +84,6 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl userIds = contactGroupMembers.stream().map(AlarmContactGroupMember::getUserId).collect(Collectors.toList()); alarmContactGroup.setUserIds(userIds); - //根据用户id获得对应的用户信息 - List sysUsers = new LinkedList<>(); - if (CollectionUtils.isNotEmpty(userList)){ - for (String userId:userIds) { - if (userList.containsKey(userId)){ - sysUsers.add(userList.get(userId)); - } - } - } - alarmContactGroup.setUsers(sysUsers); } result.setSuccess(true); result.setResult(alarmContactGroup); @@ -180,4 +168,16 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl contactGroupMemberQueryWrapper = new LambdaQueryWrapper<>(); + contactGroupMemberQueryWrapper.eq(AlarmContactGroupMember::getGroupId, id); + contactGroupMemberQueryWrapper.eq(AlarmContactGroupMember::getUserId, userId); + alarmContactGroupMemberMapper.delete(contactGroupMemberQueryWrapper); + result.setSuccess(true); + result.success("删除成功"); + return result; + } + } From 4a87591bb3030491898efe137706105f75245d91 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Mon, 24 Jul 2023 09:01:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E4=BA=BA=E7=BB=84=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=88=86=E9=A1=B5=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/service/impl/AlarmContactGroupServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java index bb2dcc68..75447336 100644 --- a/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java +++ b/jeecg-module-abnormal-alarm/src/main/java/org/jeecg/modules/service/impl/AlarmContactGroupServiceImpl.java @@ -36,7 +36,7 @@ public class AlarmContactGroupServiceImpl extends ServiceImpl userList = systemClient.findUserMap(); - Page page = new Page<>(); + Page page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize()); LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); Page alarmContactGroupPage = this.baseMapper.selectPage(page, queryWrapper); LambdaQueryWrapper contactGroupMemberQueryWrapper = new LambdaQueryWrapper<>(); From 45f4df3ab6dbbadabaaaaa3bd507a09efde729fa Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Mon, 24 Jul 2023 09:02:51 +0800 Subject: [PATCH 5/5] =?UTF-8?q?properties=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=A7=BB=E5=8A=A8=E5=88=B0base-core=E5=85=AC=E7=94=A8?= =?UTF-8?q?=E5=8C=85=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/common}/properties/SpectrumPathProperties.java | 4 ++-- .../java/org/jeecg/common}/properties/TaskProperties.java | 2 +- .../src/main/java/org/jeecg/modules/AutoProcessManager.java | 4 ++-- .../java/org/jeecg/modules/email/EmailParsingActuator.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename {jeecg-module-auto-process/src/main/java/org/jeecg/modules => jeecg-boot-base-core/src/main/java/org/jeecg/common}/properties/SpectrumPathProperties.java (86%) rename {jeecg-module-auto-process/src/main/java/org/jeecg/modules => jeecg-boot-base-core/src/main/java/org/jeecg/common}/properties/TaskProperties.java (95%) diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/properties/SpectrumPathProperties.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/SpectrumPathProperties.java similarity index 86% rename from jeecg-module-auto-process/src/main/java/org/jeecg/modules/properties/SpectrumPathProperties.java rename to jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/SpectrumPathProperties.java index 11794f5c..ba2ac55a 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/properties/SpectrumPathProperties.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/SpectrumPathProperties.java @@ -1,4 +1,4 @@ -package org.jeecg.modules.properties; +package org.jeecg.common.properties; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -13,7 +13,7 @@ import java.util.Map; */ @Data @Component -@ConfigurationProperties(prefix = "file-system") +@ConfigurationProperties(prefix = "filesystem") public class SpectrumPathProperties implements Serializable { /** diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/properties/TaskProperties.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/TaskProperties.java similarity index 95% rename from jeecg-module-auto-process/src/main/java/org/jeecg/modules/properties/TaskProperties.java rename to jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/TaskProperties.java index f3d3b2db..f8789796 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/properties/TaskProperties.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/properties/TaskProperties.java @@ -1,4 +1,4 @@ -package org.jeecg.modules.properties; +package org.jeecg.common.properties; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java index 18ef29ae..492d919e 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/AutoProcessManager.java @@ -9,8 +9,8 @@ import org.jeecg.common.util.RedisUtil; import org.jeecg.modules.email.EmailParsingActuator; import org.jeecg.modules.emuns.SysMailEnableType; import org.jeecg.modules.email.EmailProperties; -import org.jeecg.modules.properties.SpectrumPathProperties; -import org.jeecg.modules.properties.TaskProperties; +import org.jeecg.common.properties.SpectrumPathProperties; +import org.jeecg.common.properties.TaskProperties; import org.jeecg.modules.service.ISysMailService; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; diff --git a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java index 4b06c8c1..f33d8c93 100644 --- a/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java +++ b/jeecg-module-auto-process/src/main/java/org/jeecg/modules/email/EmailParsingActuator.java @@ -3,7 +3,7 @@ package org.jeecg.modules.email; import org.apache.commons.lang3.ArrayUtils; import org.jeecg.common.email.EmailServiceManager; import org.jeecg.common.util.FTPUtil; -import org.jeecg.modules.properties.TaskProperties; +import org.jeecg.common.properties.TaskProperties; import org.jeecg.modules.spectrum.SpectrumParsingActuator; import org.springframework.scheduling.concurrent.CustomizableThreadFactory; import javax.mail.Message;