| | |
| | | import com.vincent.rsf.server.system.constant.GlobalConfigCode; |
| | | import com.vincent.rsf.server.system.entity.Config; |
| | | import com.vincent.rsf.server.system.service.ConfigService; |
| | | import com.vincent.rsf.server.system.utils.SystemAuthUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | if (waveItems.isEmpty()) { |
| | | return; |
| | | } |
| | | Long loginUserId = SystemAuthUtils.getLoginUserId(); |
| | | Map<Long, List<WaveItem>> listMap = waveItems.stream().collect(Collectors.groupingBy(WaveItem::getWaveId)); |
| | | listMap.keySet().forEach(waveId -> { |
| | | List<Long> itemIds = listMap.get(waveId).stream().map(WaveItem::getId).collect(Collectors.toList()); |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("wave", waveId); |
| | | params.put("waveItem", itemIds); |
| | | waveService.waveToTask(params, waveId); |
| | | waveService.waveToTask(params, loginUserId); |
| | | }); |
| | | } |
| | | } |