|
|
@@ -10,7 +10,9 @@ import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
|
import com.zhongzheng.modules.course.domain.Course;
|
|
|
import com.zhongzheng.modules.course.mapper.CourseMapper;
|
|
|
import com.zhongzheng.modules.course.service.ICourseService;
|
|
|
+import com.zhongzheng.modules.course.service.IMajorCategoryService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseVo;
|
|
|
+import com.zhongzheng.modules.course.vo.MajorCategoryVo;
|
|
|
import com.zhongzheng.modules.order.bo.CouponQueryBo;
|
|
|
import com.zhongzheng.modules.order.vo.CouponVo;
|
|
|
import com.zhongzheng.modules.system.domain.SysUserRole;
|
|
|
@@ -37,9 +39,16 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
@Autowired
|
|
|
private CourseMapper courseMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IMajorCategoryService iMajorCategoryService;
|
|
|
+
|
|
|
@Override
|
|
|
public CourseVo queryById(Long courseId){
|
|
|
Course db = this.baseMapper.selectById(courseId);
|
|
|
+ if(db.getCategoryId()!=null){
|
|
|
+ MajorCategoryVo majorCategoryVo = iMajorCategoryService.queryById(db.getCategoryId());
|
|
|
+ db.setCategoryName(majorCategoryVo.getCategoryName());
|
|
|
+ }
|
|
|
return BeanUtil.toBean(db, CourseVo.class);
|
|
|
}
|
|
|
|