|
@@ -2,13 +2,14 @@ package com.ynfy.app.api.v1.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.ynfy.buss.banner.service.IBannerService;
|
|
|
+import com.ynfy.buss.course.course.service.ICourseService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
|
import org.jeecg.modules.system.entity.SysAnnouncement;
|
|
|
-import org.jeecg.modules.system.entity.SysPermission;
|
|
|
import org.jeecg.modules.system.service.ISysAnnouncementService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -24,6 +25,9 @@ public class ApiIndexController extends ApiBaseController {
|
|
|
@Autowired
|
|
|
private ISysAnnouncementService sysAnnouncementService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ICourseService courseService;
|
|
|
+
|
|
|
@PostMapping("/banner/list")
|
|
|
public Result<?> list() {
|
|
|
return Result.OK(bannerService.list());
|
|
@@ -41,4 +45,24 @@ public class ApiIndexController extends ApiBaseController {
|
|
|
return Result.OK(sysAnnouncementService.list(query));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 热门课程
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/listHotCourse")
|
|
|
+ public Result<?> listHotCourse() {
|
|
|
+ return Result.OK(courseService.listHotCourse(5));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 最新考试
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/listLatestExam")
|
|
|
+ public Result<?> listLatestExam() {
|
|
|
+ return Result.OK();
|
|
|
+ }
|
|
|
+
|
|
|
}
|