package com.qianwen.smartman.modules.notify.wrapper; import java.util.Objects; import java.util.Optional; import com.qianwen.core.mp.support.BaseEntityWrapper; import com.qianwen.core.tool.utils.BeanUtil; import com.qianwen.core.tool.utils.SpringUtil; import com.qianwen.smartman.modules.notify.dto.BusinessNotifyDTO; import com.qianwen.smartman.modules.notify.entity.BusinessNotify; import com.qianwen.smartman.modules.notify.service.INotifyConfigService; import com.qianwen.smartman.modules.notify.service.INotifyTemplateService; /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/wrapper/BusinessNotifyWrapper.class */ public class BusinessNotifyWrapper extends BaseEntityWrapper { public static BusinessNotifyWrapper build() { return new BusinessNotifyWrapper(); } public BusinessNotifyDTO entityVO(BusinessNotify entity) { BusinessNotifyDTO businessNotifyDTO = (BusinessNotifyDTO) Objects.requireNonNull(BeanUtil.copyProperties(entity, BusinessNotifyDTO.class)); String str = (String) Optional.ofNullable(((INotifyConfigService) SpringUtil.getBean(INotifyConfigService.class)).getById(entity.getNotifyId())).map(m -> { return m.getName(); }).orElse(""); String templateName = (String) Optional.ofNullable(((INotifyTemplateService) SpringUtil.getBean(INotifyTemplateService.class)).getById(entity.getNotifyTemplateId())).map(m2 -> { return m2.getName(); }).orElse(""); businessNotifyDTO.setNotifyTemplateName(templateName); return businessNotifyDTO; } }