|
@@ -121,7 +121,9 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
questionVO.setAge(questionIdsVO.getAge());
|
|
|
questionVO.setSexType(questionIdsVO.getSexType());
|
|
|
QuestionDTO item = this.getById(questionVO);
|
|
|
- data.put(item.getId(), item);
|
|
|
+ if (item != null && item.getId() != null) {
|
|
|
+ data.put(item.getId(), item);
|
|
|
+ }
|
|
|
}
|
|
|
return data;
|
|
|
}
|
|
@@ -131,12 +133,12 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public Map<Long,QuestionInfo> getQuestionInfos(List<Long> questionIdList){
|
|
|
+ public Map<Long, QuestionInfo> getQuestionInfos(List<Long> questionIdList) {
|
|
|
QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
|
|
|
questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .in("id",questionIdList);
|
|
|
+ .in("id", questionIdList);
|
|
|
List<QuestionInfo> questionInfoList = this.list(questionInfoQueryWrapper);
|
|
|
- Map<Long,QuestionInfo> map = questionInfoList.stream().collect(Collectors.toMap(QuestionInfo::getId,questionInfo -> questionInfo));
|
|
|
+ Map<Long, QuestionInfo> map = questionInfoList.stream().collect(Collectors.toMap(QuestionInfo::getId, questionInfo -> questionInfo));
|
|
|
return map;
|
|
|
}
|
|
|
}
|