Commit cd39c5fc by guojx

店长/店员 任务列表判空

parent 0b165c81
...@@ -174,9 +174,13 @@ public class CanvasDataController { ...@@ -174,9 +174,13 @@ public class CanvasDataController {
Set<String> clerkIdList = list.stream().filter(e -> StringUtils.isNotBlank(e.getClerkId())).map(e -> e.getClerkId()).collect(Collectors.toSet()); Set<String> clerkIdList = list.stream().filter(e -> StringUtils.isNotBlank(e.getClerkId())).map(e -> e.getClerkId()).collect(Collectors.toSet());
if (CollectionUtils.isNotEmpty(clerkIdList)) { if (CollectionUtils.isNotEmpty(clerkIdList)) {
List<ClerkDTO> clerkList = clerkService.getClerkByClerkIds(clerkIdList); List<ClerkDTO> clerkList = clerkService.getClerkByClerkIds(clerkIdList);
Map<String, String> clerkIdMapHeadImage = clerkList.stream().collect(Collectors.toMap(e -> e.getClerkId(), e -> e.getHeadImgUrl())); if (CollectionUtils.isNotEmpty(clerkList)) {
for (CanvasStoreTaskVO vo : list) { Map<String, String> clerkIdMapHeadImage = clerkList.stream()
vo.setClerkImageUrl(clerkIdMapHeadImage.get(vo.getClerkId())); .filter(e -> StringUtils.isNotBlank(e.getHeadImgUrl()))
.collect(Collectors.toMap(e -> e.getClerkId(), e -> e.getHeadImgUrl()));
for (CanvasStoreTaskVO vo : list) {
vo.setClerkImageUrl(clerkIdMapHeadImage.get(vo.getClerkId()));
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment