From 6bed83e92f67954cd2135071133329f2205efe4f Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 02 四月 2024 16:58:41 +0800
Subject: [PATCH] notify错误修改
---
smart-man-boot/src/main/java/com/qianwen/smartman/modules/notify/manager/NotifyBusinessManager.java | 40 ++++++++++------------------------------
1 files changed, 10 insertions(+), 30 deletions(-)
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/notify/manager/NotifyBusinessManager.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/notify/manager/NotifyBusinessManager.java
index 9eb57de..c25ca50 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/notify/manager/NotifyBusinessManager.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/notify/manager/NotifyBusinessManager.java
@@ -1,15 +1,16 @@
package com.qianwen.smartman.modules.notify.manager;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import java.lang.invoke.SerializedLambda;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.qianwen.core.log.exception.ServiceException;
import com.qianwen.core.log.utils.LogTraceUtil;
import com.qianwen.core.notify.DefaultNotifyType;
@@ -23,7 +24,6 @@
import com.qianwen.smartman.modules.notify.api.DingTalkApi;
import com.qianwen.smartman.modules.notify.dto.NotifySendMethodDTO;
import com.qianwen.smartman.modules.system.service.IUserOauthService;
-import org.springframework.stereotype.Component;
@Component
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/manager/NotifyBusinessManager.class */
@@ -34,28 +34,6 @@
private final IEmployeeService employeeService;
private final IUserOauthService userOauthService;
- private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) {
- String implMethodName = lambda.getImplMethodName();
- boolean z = true;
- switch (implMethodName.hashCode()) {
- case 98245393:
- if (implMethodName.equals("getId")) {
- z = false;
- break;
- }
- break;
- }
- switch (z) {
- case false:
- if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/core/mp/base/BaseEntity") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) {
- return (v0) -> {
- return v0.getId();
- };
- }
- break;
- }
- throw new IllegalArgumentException("Invalid lambda deserialization");
- }
public NotifyBusinessManager(final NotifierManager notifierManager, final DingTalkApi dingTalkApi, final IEmployeeService employeeService, final IUserOauthService userOauthService) {
this.notifierManager = notifierManager;
@@ -84,18 +62,20 @@
}
private List<String> getProviderName(String providerName, List<Long> empIds) {
+ List<Employee> employees = this.employeeService.list(Wrappers.<Employee>lambdaQuery().in(Employee::getId, empIds));
+ /*
List<Employee> employees = this.employeeService.list((Wrapper) Wrappers.lambdaQuery().in((v0) -> {
return v0.getId();
- }, empIds));
+ }, empIds));*/
if (Func.isEmpty(employees)) {
return null;
}
- List<String> tels = (List) employees.stream().map((v0) -> {
+ List<String> tels = employees.stream().map((v0) -> {
return v0.getTel();
}).filter((v0) -> {
return Func.isNotEmpty(v0);
}).collect(Collectors.toList());
- List<String> ids = (List) employees.stream().map((v0) -> {
+ List<String> ids = employees.stream().map((v0) -> {
return v0.getUserId();
}).filter((v0) -> {
return Func.isNotEmpty(v0);
@@ -106,7 +86,7 @@
notifiedParty = ids;
}
} else if (Func.equals(DefaultNotifyType.email.name(), providerName)) {
- notifiedParty = (List) employees.stream().map((v0) -> {
+ notifiedParty = employees.stream().map((v0) -> {
return v0.getEmail();
}).collect(Collectors.toList());
} else if (Func.equals(DefaultNotifyType.dingTalk.name(), providerName)) {
--
Gitblit v1.9.3