Jelajahi Sumber

APP课程分类新增查询条件(过滤娱乐模块分类)

wjj 17 jam lalu
induk
melakukan
e6a05f3c7f

+ 3 - 0
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseCategoryMapper.java

@@ -71,6 +71,9 @@ public interface FsUserCourseCategoryMapper
     @Select("select cate_id dict_value, cate_name dict_label  from fs_user_course_category WHERE pid = 0 and is_del=0 ")
     List<OptionsVO> selectFsUserCourseCategoryPidList();
 
+    @Select("select cate_id dict_value, cate_name dict_label  from fs_user_course_category WHERE pid = 0 and is_del=0 AND is_open_class = 0 ")
+    List<OptionsVO> selectAPPFsUserCourseCategoryPidList();
+
     @Select("select cate_id dict_value, cate_name dict_label  from fs_user_course_category WHERE pid =#{pid} and is_del=0 ")
     List<OptionsVO> selectCateListByPid(Long pid);
 

+ 1 - 0
fs-service/src/main/java/com/fs/course/service/IFsUserCourseCategoryService.java

@@ -64,6 +64,7 @@ public interface IFsUserCourseCategoryService
     List<OptionsVO> selectFsUserCoursePidList();
 
     List<OptionsVO> selectFsUserCourseCategoryPidList();
+    List<OptionsVO> selectAPPFsUserCourseCategoryPidList();
 
     List<OptionsVO> selectCateListByPid(Long pid);
 }

+ 6 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseCategoryServiceImpl.java

@@ -1,5 +1,6 @@
 package com.fs.course.service.impl;
 
+import java.util.Collections;
 import java.util.List;
 import com.fs.common.utils.DateUtils;
 import com.fs.his.vo.OptionsVO;
@@ -105,6 +106,11 @@ public class FsUserCourseCategoryServiceImpl implements IFsUserCourseCategorySer
         return fsUserCourseCategoryMapper.selectFsUserCourseCategoryPidList();
     }
 
+    @Override
+    public List<OptionsVO> selectAPPFsUserCourseCategoryPidList() {
+        return fsUserCourseCategoryMapper.selectAPPFsUserCourseCategoryPidList();
+    }
+
 
     @Override
     public List<OptionsVO> selectCateListByPid(Long pid) {

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/controller/CourseController.java

@@ -55,7 +55,7 @@ public class CourseController extends  AppBaseController{
     @GetMapping("/getCourseCate")
     public R getCourseCate(){
         try {
-            List<OptionsVO> list = courseCategoryService.selectFsUserCourseCategoryPidList();
+            List<OptionsVO> list = courseCategoryService.selectAPPFsUserCourseCategoryPidList();
             return R.ok().put("data",list);
         } catch (Exception e){
             return R.error("操作异常");