| | |
| | | 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; |
| | |
| | | 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 */ |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | 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); |
| | |
| | | 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)) { |