|
@@ -135,10 +135,7 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
List<QuestionInfo> questionInfoList = this.list(questionInfoQueryWrapper);
|
|
|
- Map<Long,QuestionInfo> map = new HashMap<>();
|
|
|
- for (QuestionInfo questionInfo:questionInfoList) {
|
|
|
- map.put(questionInfo.getId(),questionInfo);
|
|
|
- }
|
|
|
+ Map<Long,QuestionInfo> map = questionInfoList.stream().collect(Collectors.toMap(QuestionInfo::getId,questionInfo -> questionInfo));
|
|
|
return map;
|
|
|
}
|
|
|
}
|