|
|
@@ -16,6 +16,7 @@ import com.fs.course.config.CourseConfig;
|
|
|
|
|
|
import com.fs.his.vo.OptionsVO;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
+import com.github.pagehelper.util.StringUtil;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
@@ -155,12 +156,16 @@ public class FsUserCourseCategoryController extends BaseController
|
|
|
|
|
|
//获取1级总分类
|
|
|
@GetMapping("/getCatePidList")
|
|
|
- public R getCatePidList()
|
|
|
+ public R getCatePidList(String isOpenClass)
|
|
|
{
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
Long userId = loginUser.getUser().getUserId();
|
|
|
String json = configService.selectConfigByKey("course.config");
|
|
|
CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
+ if (StringUtil.isNotEmpty(isOpenClass)){
|
|
|
+ List<OptionsVO> list = fsUserCourseCategoryService.selectFsUserCourseCategoryIsOpenClassList(isOpenClass);
|
|
|
+ return R.ok().put("data", list);
|
|
|
+ }
|
|
|
if (ObjectUtil.isNotEmpty(config.getIsBound())&&config.getIsBound()){
|
|
|
List<OptionsVO> list = fsUserCourseCategoryService.selectFsUserCourseCategoryPidList(userId);
|
|
|
return R.ok().put("data", list);
|