|
|
@@ -12,7 +12,9 @@ import com.zhongzheng.modules.bank.service.IQuestionBankService;
|
|
|
import com.zhongzheng.modules.bank.vo.QuestionBankVo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
|
import com.zhongzheng.modules.course.mapper.CourseMapper;
|
|
|
+import com.zhongzheng.modules.course.service.IMajorCategoryService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseVo;
|
|
|
+import com.zhongzheng.modules.course.vo.MajorCategoryVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
@@ -38,9 +40,16 @@ public class QuestionBankServiceImpl extends ServiceImpl<QuestionBankMapper, Que
|
|
|
@Autowired
|
|
|
private QuestionBankMapper questionBankMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IMajorCategoryService iMajorCategoryService;
|
|
|
+
|
|
|
@Override
|
|
|
public QuestionBankVo queryById(Long bankId){
|
|
|
QuestionBank db = this.baseMapper.selectById(bankId);
|
|
|
+ if(db.getCategoryId()!=null){
|
|
|
+ MajorCategoryVo majorCategoryVo = iMajorCategoryService.queryById(db.getCategoryId());
|
|
|
+ db.setCategoryName(majorCategoryVo.getCategoryName());
|
|
|
+ }
|
|
|
return BeanUtil.toBean(db, QuestionBankVo.class);
|
|
|
}
|
|
|
|