Prechádzať zdrojové kódy

调整用户端课程查询不查询状态关闭的课程

liyanbo 5 mesiacov pred
rodič
commit
024e9fe26d

+ 2 - 1
byzs-web/src/main/java/cn/iocoder/byzs/module/web/service/blockly/WebBlocklyServiceImpl.java

@@ -1,6 +1,7 @@
 package cn.iocoder.byzs.module.web.service.blockly;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.iocoder.byzs.framework.common.enums.CommonStatusEnum;
 import cn.iocoder.byzs.framework.common.util.object.BeanUtils;
 import cn.iocoder.byzs.module.blockly.controller.admin.blockly.vo.BlocklyPageReqVO;
 import cn.iocoder.byzs.module.blockly.controller.admin.blocklyConfig.vo.BlocklyConfigRespVO;
@@ -34,7 +35,7 @@ public class WebBlocklyServiceImpl {
 
 
     public List<WebBlocklyVO> getBlocklyVoByTypeId(Long typeId) {
-        List<BlocklyPageReqVO> blocklyList = blocklyService.getBlocklyList(new BlocklyPageReqVO().setBcType(typeId));
+        List<BlocklyPageReqVO> blocklyList = blocklyService.getBlocklyList(new BlocklyPageReqVO().setBcType(typeId).setBcStatus(String.valueOf(CommonStatusEnum.ENABLE.getStatus())));
 
         // 目前数据少先循环查询即可
 //        List<Long> idList = blocklyList.stream()

+ 2 - 1
byzs-web/src/main/java/cn/iocoder/byzs/module/web/service/course/WebCourseServiceImpl.java

@@ -1,6 +1,7 @@
 package cn.iocoder.byzs.module.web.service.course;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.iocoder.byzs.framework.common.enums.CommonStatusEnum;
 import cn.iocoder.byzs.framework.common.util.object.BeanUtils;
 import cn.iocoder.byzs.module.bjdx.controller.admin.course.vo.CoursePageReqVO;
 import cn.iocoder.byzs.module.bjdx.controller.admin.courseconfig.vo.CourseConfigRespVO;
@@ -35,7 +36,7 @@ public class WebCourseServiceImpl{
 
 
     public List<WebCourseVO> getCourseVoByTypeId(Long typeId) {
-        List<CoursePageReqVO> courseList = courseService.getCourseList(new CoursePageReqVO().setCourseType(typeId));
+        List<CoursePageReqVO> courseList = courseService.getCourseList(new CoursePageReqVO().setCourseType(typeId).setCourseStatus(String.valueOf(CommonStatusEnum.ENABLE.getStatus())));
 
         // 目前数据少先循环查询即可
 //        List<Long> idList = courseList.stream()