| | |
| | | package com.qianwen.smartman.modules.notify.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | 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.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.qianwen.core.mp.base.BaseServiceImpl; |
| | | import com.qianwen.core.tool.utils.Func; |
| | | import com.qianwen.smartman.modules.cps.entity.CommonGroup; |
| | |
| | | import com.qianwen.smartman.modules.notify.service.IBusinessNotifyStateService; |
| | | import com.qianwen.smartman.modules.notify.vo.BusinessNotifyStateVO; |
| | | import com.qianwen.smartman.modules.sync.constant.DingConstant; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/service/impl/BusinessNotifyStateServiceImpl.class */ |
| | |
| | | private IEmployeeService employeeService; |
| | | @Autowired |
| | | private ICommonGroupService commonGroupService; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -1492577373: |
| | | if (implMethodName.equals("getGroupType")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 98245393: |
| | | if (implMethodName.equals("getId")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 584947017: |
| | | if (implMethodName.equals("getBusinessKey")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | case 803533544: |
| | | if (implMethodName.equals("getStatus")) { |
| | | z = true; |
| | | break; |
| | | } |
| | | break; |
| | | case 1404342513: |
| | | if (implMethodName.equals("getBusinessId")) { |
| | | z = true; |
| | | 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/modules/notify/entity/BusinessNotifyState") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getBusinessKey(); |
| | | }; |
| | | } |
| | | 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/modules/notify/entity/BusinessNotifyState") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getBusinessKey(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | 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/modules/notify/entity/BusinessNotifyState") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getBusinessId(); |
| | | }; |
| | | } |
| | | 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/modules/notify/entity/BusinessNotifyState") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getBusinessId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | 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/modules/cps/entity/CommonGroup") && lambda.getImplMethodSignature().equals("()Ljava/lang/Long;")) { |
| | | return (v0) -> { |
| | | return v0.getId(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | 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/modules/cps/entity/CommonGroup") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getGroupType(); |
| | | }; |
| | | } |
| | | break; |
| | | case true: |
| | | 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/modules/cps/entity/CommonGroup") && lambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) { |
| | | return (v0) -> { |
| | | return v0.getStatus(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.IBusinessNotifyStateService |
| | | public List<BusinessNotifyState> listByBusinessKey(String businessKey) { |
| | |
| | | |
| | | private BusinessNotifyStateVO buildBusinessNotifyStateVO(List<BusinessNotifyState> states) { |
| | | BusinessNotifyStateVO stateVO = new BusinessNotifyStateVO(); |
| | | Map<Integer, Set<Long>> notifyStateMap = (Map) states.parallelStream().collect(Collectors.groupingBy((v0) -> { |
| | | Map<Integer, Set<Long>> notifyStateMap = states.parallelStream().collect(Collectors.groupingBy((v0) -> { |
| | | return v0.getPersonType(); |
| | | }, Collectors.mapping((v0) -> { |
| | | return v0.getPersonId(); |
| | |
| | | } |
| | | if (notifyStateMap.containsKey(Integer.valueOf(ObjectTypeEnum.ORG.getCode()))) { |
| | | Set<Long> ids2 = notifyStateMap.get(Integer.valueOf(ObjectTypeEnum.ORG.getCode())); |
| | | List<CommonGroup> list = this.commonGroupService.list(Wrappers.<CommonGroup>lambdaQuery().eq(CommonGroup::getStatus, Boolean.valueOf(true)) |
| | | .in(CommonGroup::getId, ids2).eq(CommonGroup::getGroupType, DingConstant.GROUPTYPE));; |
| | | /* |
| | | List<CommonGroup> list = this.commonGroupService.list((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getStatus(); |
| | | }, true)).in((v0) -> { |
| | | return v0.getId(); |
| | | }, ids2)).eq((v0) -> { |
| | | return v0.getGroupType(); |
| | | }, DingConstant.GROUPTYPE)); |
| | | }, DingConstant.GROUPTYPE));*/ |
| | | List<BusinessNotifyStateDTO> stateDTOS2 = BusinessNotifyStateConvert.INSTANCE.convertByOrgList(list); |
| | | stateVO.setOrgList(stateDTOS2); |
| | | } |
| | |
| | | |
| | | private List<BusinessNotifyState> listByBusinessKeyAndBusinessId(String businessKey, Long businessId) { |
| | | boolean notEmpty = Func.isNotEmpty(businessId); |
| | | return list(Wrappers.<BusinessNotifyState>lambdaQuery().eq(BusinessNotifyState::getBusinessKey, businessKey) |
| | | .eq(notEmpty, BusinessNotifyState::getBusinessId, businessId)); |
| | | /* |
| | | return list(((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getBusinessKey(); |
| | | }, businessKey)).eq(notEmpty, (v0) -> { |
| | | return v0.getBusinessId(); |
| | | }, businessId)); |
| | | }, businessId));*/ |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.IBusinessNotifyStateService |
| | |
| | | } |
| | | |
| | | void deleteListByBusinessId(String businessKey, Long businessId) { |
| | | remove(Wrappers.<BusinessNotifyState>lambdaQuery().eq(BusinessNotifyState::getBusinessKey, businessKey) |
| | | .eq(BusinessNotifyState::getBusinessId, businessId)); |
| | | /* |
| | | remove((Wrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getBusinessKey(); |
| | | }, businessKey)).eq((v0) -> { |
| | | return v0.getBusinessId(); |
| | | }, businessId)); |
| | | }, businessId));*/ |
| | | } |
| | | } |