|
@@ -40,9 +40,14 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public IntroduceDTO getByQuestionId(IntroduceByQuestionVO introduceByQuestionVO) {
|
|
|
- if (introduceByQuestionVO.getQuestionId() == null) {
|
|
|
+ Long questionId = introduceByQuestionVO.getQuestionId();
|
|
|
+ if (questionId == null) {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "请输入标签id");
|
|
|
}
|
|
|
+ QuestionInfo questionInfo = questionFacade.getById(questionId);
|
|
|
+ if (questionInfo == null) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "未找到标签");
|
|
|
+ }
|
|
|
QueryWrapper<IntroduceMap> introduceMapQueryWrapper = new QueryWrapper<>();
|
|
|
introduceMapQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
eq("question_id", introduceByQuestionVO.getQuestionId()).
|
|
@@ -53,6 +58,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
IntroduceDTO introduceDTO = this.getRecordByIdAndPosition(introduceMap.getIntroduceId(), introduceByQuestionVO.getPosition());
|
|
|
+ introduceDTO.setTagName(questionInfo.getTagName());
|
|
|
return introduceDTO;
|
|
|
}
|
|
|
|
|
@@ -85,6 +91,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
IntroduceDTO introduceDTO = this.getRecordByIdAndPosition(introduceMap.getIntroduceId(), introduceByQuestionVO.getPosition());
|
|
|
+ introduceDTO.setTagName(questionInfo.getTagName());
|
|
|
return introduceDTO;
|
|
|
}
|
|
|
|