|
@@ -6,9 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.ynfy.buss.course.course.entity.Course;
|
|
|
import com.ynfy.buss.course.course.service.ICourseService;
|
|
|
import com.ynfy.buss.course.coursecatalog.service.ICourseCatalogService;
|
|
|
+import com.ynfy.buss.exam.exam.entity.Exam;
|
|
|
+import com.ynfy.buss.exam.exam.service.IExamService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
@@ -21,6 +24,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @Description: course
|
|
@@ -39,6 +43,8 @@ public class CourseController extends JeecgController<Course, ICourseService> {
|
|
|
@Autowired
|
|
|
private ICourseCatalogService courseCatalogService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IExamService examService;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
@@ -125,6 +131,11 @@ public class CourseController extends JeecgController<Course, ICourseService> {
|
|
|
return Result.error("未找到对应数据");
|
|
|
}
|
|
|
course.setCatalogList(courseCatalogService.listByCourseId(course.getId()));
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(course.getExamId())) {
|
|
|
+ Exam exam = examService.getById(course.getExamId());
|
|
|
+ course.setExamTitle(!Objects.isNull(exam) ? exam.getTitle() : null);
|
|
|
+ }
|
|
|
return Result.OK(course);
|
|
|
}
|
|
|
|