| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.time.LocalDateTime;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
| | | import com.ruoyi.project.system.mapper.SysUserMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.context.annotation.Lazy;
|
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.project.system.domain.SysNotice;
|
| | | import com.ruoyi.project.system.mapper.SysNoticeMapper;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void simpleNoticeByUser(String title, String message, List<Long> consigneeId, Long tenantId,
|
| | | String jumpPath) {
|
| | | public void simpleNoticeByUser(String title, String message, List<Long> consigneeId, String jumpPath) {
|
| | | Long userId = SecurityUtils.getLoginUser().getUserId();
|
| | | Long tenantId = SecurityUtils.getLoginUser().getTenantId();
|
| | | List<SysNotice> sysNotices = consigneeId.stream().map(it -> convertSysNotice(title, message, it,tenantId, jumpPath, userId)).collect(Collectors.toList());
|
| | | sysNoticeService.saveBatch(sysNotices);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void simpleNoticeAll(String title, String message, Long rootDeptId, String jumpPath) {
|
| | | public void simpleNoticeAll(String title, String message, String jumpPath) {
|
| | | Long userId = SecurityUtils.getLoginUser().getUserId();
|
| | | if (userId == null) {
|
| | | return;
|
| | | }
|
| | |
|
| | | Long rootDeptId = SecurityUtils.getLoginUser().getTenantId();
|
| | | // 查所有子部门
|
| | | List<SysDept> childrenDepts = deptMapper.selectChildrenDeptById(rootDeptId);
|
| | |
|
| | |
| | | sysNotice.setTenantId(tenantId);
|
| | | return sysNotice;
|
| | | }
|
| | |
|
| | | }
|