|
@@ -0,0 +1,87 @@
|
|
|
+package org.jeecg.modules.ctop.controller;
|
|
|
+
|
|
|
+import cn.com.ctop.manage.modules.edu.entity.EduLesson;
|
|
|
+import cn.com.ctop.manage.modules.edu.service.IEduLessonService;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.ctop.entity.DramaInfo;
|
|
|
+import org.jeecg.modules.system.entity.SysCategory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Api(tags="在线培训")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/ctop/edu")
|
|
|
+public class EduLessonController {
|
|
|
+ @Autowired
|
|
|
+ private IEduLessonService eduLessonService;
|
|
|
+ @GetMapping(value = "/kuaishou/lesson")
|
|
|
+ public Result<List<String>> getKuaishouLessonList(){
|
|
|
+ Result<List<String>> result = new Result<>();
|
|
|
+ List<String> list = eduLessonService.getTitleList("快手大学");
|
|
|
+ result.setResult(list);
|
|
|
+ result.setSuccess(true);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ @GetMapping(value = "/kuaishou/topic")
|
|
|
+ public Result<List<String>> getKuaishouTopicList(String title){
|
|
|
+ Result<List<String>> result = new Result<>();
|
|
|
+ List<String> list = eduLessonService.getTopicList("快手大学",title);
|
|
|
+ result.setResult(list);
|
|
|
+ result.setSuccess(true);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ @GetMapping(value = "/ocean/lesson")
|
|
|
+ public Result<List<String>> getOceanLessonList(){
|
|
|
+ Result<List<String>> result = new Result<>();
|
|
|
+ List<String> list = eduLessonService.getTitleList("巨量引擎");
|
|
|
+ result.setResult(list);
|
|
|
+ result.setSuccess(true);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ @GetMapping(value = "/ocean/topic")
|
|
|
+ public Result<List<String>> getOceanTopicList(String title){
|
|
|
+ Result<List<String>> result = new Result<>();
|
|
|
+ List<String> list = eduLessonService.getTopicList("巨量引擎",title);
|
|
|
+ result.setResult(list);
|
|
|
+ result.setSuccess(true);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ @GetMapping(value = "/detail")
|
|
|
+ public Result<EduLesson> detail(Long id){
|
|
|
+ Result<EduLesson> result = new Result<>();
|
|
|
+ EduLesson eduLesson = eduLessonService.getById(id);
|
|
|
+ result.setResult(eduLesson);
|
|
|
+ result.setSuccess(true);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping(value = "/lesson/list")
|
|
|
+ public Result<List<EduLesson>> lessonList(String media,String title,String topic){
|
|
|
+ Result<List<EduLesson>> result = new Result<>();
|
|
|
+ QueryWrapper<EduLesson> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("media",media);
|
|
|
+ queryWrapper.eq("title",title);
|
|
|
+ queryWrapper.eq("topic",topic);
|
|
|
+ List<EduLesson> list = eduLessonService.list(queryWrapper);
|
|
|
+ result.setResult(list);
|
|
|
+ result.setSuccess(true);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+}
|