| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/service/impl/NotifyConfigServiceImpl.class */ |
| | | |
| | | public class NotifyConfigServiceImpl extends BaseServiceImpl<NotifyConfigMapper, NotifyConfigEntity> implements INotifyConfigService { |
| | | private static final Logger log = LoggerFactory.getLogger(NotifyConfigServiceImpl.class); |
| | | private final BusinessNotifyMapper notifyBusinessMapper; |
| | |
| | | this.outerAppConfigService = outerAppConfigService; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.INotifyConfigService |
| | | |
| | | public void updateServerConfig(OuterAppConfig outerAppConfig) { |
| | | Integer appType = outerAppConfig.getAppType(); |
| | | if (appType.intValue() == 1) { |
| | |
| | | return false; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.INotifyConfigService |
| | | |
| | | public NotifyConfigEntity saveOrUpdateConfig(NotifyConfigEntity notificationConfig) { |
| | | if (Func.isNotEmpty(notificationConfig.getId())) { |
| | | CacheUtil.evict("blade:notify", "notifier:id:", notificationConfig.getId(), false); |
| | |
| | | return notificationConfig; |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.INotifyConfigService |
| | | |
| | | public boolean checkUsedByBusinessNotify(String id) { |
| | | Long count = this.notifyBusinessMapper.selectCount(Wrappers.<BusinessNotify>lambdaQuery() |
| | | .eq(BusinessNotify::getNotifyId, id)); |
| | |
| | | })); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.INotifyConfigService |
| | | |
| | | public List<NotifyTypeInfo> getServiceList() { |
| | | Map<String, NotifyTypeInfo> typeInfoMap = getNotifyInfo(); |
| | | List<String> typeList = CollectionUtil.list(Boolean.FALSE.booleanValue(), typeInfoMap.keySet()); |
| | |
| | | return new ArrayList<>(typeInfoMap.values()); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.INotifyConfigService |
| | | |
| | | public ConfigMetadata getMetadataByTypeAndProvider(String type, String provider) { |
| | | ConfigMetadata result = null; |
| | | List<NotifierProvider> providerList = this.providers.stream().filter(prov -> { |
| | |
| | | })); |
| | | } |
| | | |
| | | @Override // org.springblade.modules.notify.service.INotifyConfigService |
| | | |
| | | public List<NotifyTypeInfo> getAllNotifyType() { |
| | | List<NotifyTypeInfo> result = new ArrayList<>(); |
| | | Map<NotifyType, List<NotifierProvider>> groups = this.providers.stream().collect(Collectors.groupingBy((v0) -> { |