Commit cb2bce41 authored by 廖旭伟's avatar 廖旭伟

问题选项保存时questionId为空的bug修改

parent 72c6da3f
...@@ -35,8 +35,8 @@ public class FeedbackQuestionServiceImpl extends AbstractCRUDServiceImpl<Feedbac ...@@ -35,8 +35,8 @@ public class FeedbackQuestionServiceImpl extends AbstractCRUDServiceImpl<Feedbac
item.setQuestionId(entity.getId()); item.setQuestionId(entity.getId());
item.setCreateUserId(this.getContextUserId(context)); item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date()); item.setCreateTime(new Date());
feedbackOptionService.save(item);
}).count(); }).count();
feedbackOptionService.save(entity.getFeedbackOptionList());
} }
super.saveAfter(entity, context); super.saveAfter(entity, context);
} }
......
...@@ -52,7 +52,9 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe ...@@ -52,7 +52,9 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
item.setCreateUserId(this.getContextUserId(context)); item.setCreateUserId(this.getContextUserId(context));
item.setCreateTime(new Date()); item.setCreateTime(new Date());
}).count(); }).count();
feedbackQuestionService.save(entity.getFeedbackQuestionList()); for(FeedbackQuestionEntity questionEntity:entity.getFeedbackQuestionList()) {
feedbackQuestionService.save(questionEntity);
}
} }
if(!ObjectUtils.isEmpty(entity.getStaffList())){ if(!ObjectUtils.isEmpty(entity.getStaffList())){
List<FeedbackStaffEntity> staffEntityList = new ArrayList<>(); List<FeedbackStaffEntity> staffEntityList = new ArrayList<>();
...@@ -81,7 +83,9 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe ...@@ -81,7 +83,9 @@ public class FeedbackServiceImpl extends AbstractCRUDServiceImpl<FeedbackDao, Fe
item.setUpdateUserId(this.getContextUserId(context)); item.setUpdateUserId(this.getContextUserId(context));
item.setUpdateTime(new Date()); item.setUpdateTime(new Date());
}).count(); }).count();
feedbackQuestionService.save(entity.getFeedbackQuestionList()); for(FeedbackQuestionEntity questionEntity:entity.getFeedbackQuestionList()) {
feedbackQuestionService.save(questionEntity);
}
} }
if(!ObjectUtils.isEmpty(entity.getStaffList())){ if(!ObjectUtils.isEmpty(entity.getStaffList())){
Long[] feedbackStaffIds = feedbackStaffService.find(new FeedbackStaffQuery().feedbackId(entity.getId())).stream().map(FeedbackStaffEntity::getId).toArray(Long[]::new); Long[] feedbackStaffIds = feedbackStaffService.find(new FeedbackStaffQuery().feedbackId(entity.getId())).stream().map(FeedbackStaffEntity::getId).toArray(Long[]::new);
......
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