yangys
2024-05-18 cc0bdfb33ef638dfafe3185c92c7076d815e1c9b
smart-man-boot/src/main/java/com/qianwen/smartman/modules/notify/service/impl/BusinessNotifyServiceImpl.java
@@ -52,7 +52,7 @@
@Transactional(rollbackFor = {Exception.class})
@Service
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/service/impl/BusinessNotifyServiceImpl.class */
public class BusinessNotifyServiceImpl extends BaseServiceImpl<BusinessNotifyMapper, BusinessNotify> implements IBusinessNotifyService {
    private static final Logger log = LoggerFactory.getLogger(BusinessNotifyServiceImpl.class);
    private final NotifyConfigServiceImpl notifyConfigService;
@@ -77,7 +77,7 @@
        this.notifyBusinessManager = notifyBusinessManager;
    }
    @Override // org.springblade.modules.notify.service.IBusinessNotifyService
    public List<NotifyBusinessTreeVO> tree() {
        List<NotifyBusinessTreeDTO> notifyList = this.businessNotifyMapper.treeList(NotifyConstant.NOTIFY_BUSINESS_KEY);
        List<NotifyBusinessTreeVO> vos = BusinessNotifyConvert.INSTANCE.convertDTOToVO(notifyList);
@@ -86,7 +86,7 @@
        return trees;
    }
    @Override // org.springblade.modules.notify.service.IBusinessNotifyService
    public List<BusinessNotifyDTO> list(String businessKey) {
        Map<String, NotifyTypeInfo> typeInfoMap = this.notifyConfigService.getNotifyInfo();
        Map<String, BusinessNotifyDTO> businessMap = this.businessNotifyMapper.businessList(businessKey).stream().collect(Collectors.toMap(BusinessNotifyDTO::getNotifyType, notifyBusiness -> notifyBusiness));
@@ -132,7 +132,7 @@
        return result;
    }
    @Override // org.springblade.modules.notify.service.IBusinessNotifyService
    public NotifyBusinessSaveVO save(NotifyBusinessSaveVO notifyBusinessVO) {
        NotifyTemplateEntity templateEntity = notifyBusinessVO.getTemplateEntity();
        if (Func.isNotEmpty(templateEntity) && Func.isNotEmpty(templateEntity.getId())) {
@@ -152,7 +152,7 @@
        return notifyBusinessVO;
    }
    @Override // org.springblade.modules.notify.service.IBusinessNotifyService
    public Boolean change(NotifyBusinessChangeStatusVO changeStatusVO) {
       BusinessNotify businessNotify = (BusinessNotify)getOne(Wrappers.lambdaQuery(BusinessNotify.class)
               .eq(BusinessNotify::getBusinessKey, changeStatusVO.getBusinessKey()).eq(BusinessNotify::getNotifyType, changeStatusVO.getNotifyType()));
@@ -168,7 +168,7 @@
        return Boolean.valueOf(changeStatus(Collections.singletonList(businessNotify.getId()), changeStatusVO.getStatus()));
    }
    @Override // org.springblade.modules.notify.service.IBusinessNotifyService
    public NotifyTemplateEntity modify(NotifyTemplateEntity notifyTemplateEntity) {
        if (Func.isNotEmpty(notifyTemplateEntity) && Func.isNotEmpty(notifyTemplateEntity.getId())) {
            CacheUtil.evict("blade:notify", "template:id:", notifyTemplateEntity.getId(), false);
@@ -178,7 +178,7 @@
        return notifyTemplateEntity;
    }
    @Override // org.springblade.modules.notify.service.IBusinessNotifyService
    public boolean remove(Long templateId) {
        this.notifyTemplateService.removeById(templateId);
        return remove(Wrappers.lambdaQuery(BusinessNotify.class).eq(BusinessNotify::getNotifyTemplateId, templateId));
@@ -197,7 +197,7 @@
        return empIds.stream().distinct().collect(Collectors.toList());
    }
    @Override // org.springblade.modules.notify.service.IBusinessNotifyService
    public void sendMessage(NotifySendDTO notifySendDTO) {
        String businessKey = notifySendDTO.getBusinessKey();
        List<BusinessNotify> list = list(Wrappers.<BusinessNotify>lambdaQuery().eq(BusinessNotify::getStatus, 1)