Commit aaae238c by 杨卫

Merge remote-tracking branch 'origin/V5.5.3' into V5.5.3

2 parents 59bb0cd7 8094c611
...@@ -37,5 +37,8 @@ public class StaffConfigDTO implements Serializable { ...@@ -37,5 +37,8 @@ public class StaffConfigDTO implements Serializable {
@ApiModelProperty(notes = "长课程配置任务ID") @ApiModelProperty(notes = "长课程配置任务ID")
private Integer taskId; private Integer taskId;
@ApiModelProperty(notes = "长课程配置任务状态 0未开始 1进行中 2已结束")
private Byte taskStatus;
private Date createdDate; private Date createdDate;
} }
...@@ -783,6 +783,13 @@ public class LongcourseSceneConfigService { ...@@ -783,6 +783,13 @@ public class LongcourseSceneConfigService {
.max(Integer::compareTo) .max(Integer::compareTo)
.orElse(null)); .orElse(null));
// 取最大值或第一个即可(看你业务需要)
merged.setTaskStatus(group.stream()
.map(StaffConfigDTO::getTaskStatus)
.filter(Objects::nonNull)
.max(Byte::compareTo)
.orElse(null));
return merged; return merged;
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -825,6 +832,7 @@ public class LongcourseSceneConfigService { ...@@ -825,6 +832,7 @@ public class LongcourseSceneConfigService {
if (CollectionUtils.isNotEmpty(contentManagerTaskStaffDTOS)){ if (CollectionUtils.isNotEmpty(contentManagerTaskStaffDTOS)){
oneMonthOrderStaffDTO.setCourseConfigFlag(1); oneMonthOrderStaffDTO.setCourseConfigFlag(1);
oneMonthOrderStaffDTO.setTaskId(contentManagerTaskStaffDTOS.get(0).getCmtId()); oneMonthOrderStaffDTO.setTaskId(contentManagerTaskStaffDTOS.get(0).getCmtId());
oneMonthOrderStaffDTO.setTaskStatus(contentManagerTaskStaffDTOS.get(0).getTaskStatus());
} }
Optional<StaffConfigDTO> staffConfigDTO = list.stream() Optional<StaffConfigDTO> staffConfigDTO = list.stream()
.filter(item -> Objects.equals(item.getPhone(), oneMonthOrderStaffDTO.getPhone())) .filter(item -> Objects.equals(item.getPhone(), oneMonthOrderStaffDTO.getPhone()))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!