|
@@ -15,6 +15,7 @@ import com.fs.course.config.CourseConfig;
|
|
|
|
|
|
|
|
import com.fs.his.vo.OptionsVO;
|
|
import com.fs.his.vo.OptionsVO;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -53,6 +54,8 @@ public class FsUserCourseCategoryController extends BaseController
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
private ISysConfigService configService;
|
|
|
|
|
|
|
|
|
|
+ @Value("${cloud_host.company_name}")
|
|
|
|
|
+ private String signProjectName;
|
|
|
/**
|
|
/**
|
|
|
* 查询课堂分类列表
|
|
* 查询课堂分类列表
|
|
|
*/
|
|
*/
|
|
@@ -60,6 +63,7 @@ public class FsUserCourseCategoryController extends BaseController
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
public AjaxResult list(FsUserCourseCategory fsUserCourseCategory)
|
|
public AjaxResult list(FsUserCourseCategory fsUserCourseCategory)
|
|
|
{
|
|
{
|
|
|
|
|
+ if( !"医健宝".equals(signProjectName) ){
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
Long userId = loginUser.getUser().getUserId();
|
|
Long userId = loginUser.getUser().getUserId();
|
|
|
String json = configService.selectConfigByKey("course.config");
|
|
String json = configService.selectConfigByKey("course.config");
|
|
@@ -67,6 +71,7 @@ public class FsUserCourseCategoryController extends BaseController
|
|
|
if (ObjectUtil.isNotEmpty(config.getIsBound())&&config.getIsBound()){
|
|
if (ObjectUtil.isNotEmpty(config.getIsBound())&&config.getIsBound()){
|
|
|
fsUserCourseCategory.setUserId(userId);
|
|
fsUserCourseCategory.setUserId(userId);
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
List<FsUserCourseCategory> list = fsUserCourseCategoryService.selectFsUserCourseCategoryList(fsUserCourseCategory);
|
|
List<FsUserCourseCategory> list = fsUserCourseCategoryService.selectFsUserCourseCategoryList(fsUserCourseCategory);
|
|
|
return AjaxResult.success(list);
|
|
return AjaxResult.success(list);
|
|
|
}
|
|
}
|
|
@@ -155,13 +160,15 @@ public class FsUserCourseCategoryController extends BaseController
|
|
|
@GetMapping("/getCatePidList")
|
|
@GetMapping("/getCatePidList")
|
|
|
public R getCatePidList()
|
|
public R getCatePidList()
|
|
|
{
|
|
{
|
|
|
- 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 (ObjectUtil.isNotEmpty(config.getIsBound())&&config.getIsBound()){
|
|
|
|
|
- List<OptionsVO> list = fsUserCourseCategoryService.selectFsUserCourseCategoryPidList(userId);
|
|
|
|
|
- return R.ok().put("data", list);
|
|
|
|
|
|
|
+ if( !"医健宝".equals(signProjectName) ){
|
|
|
|
|
+ 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 (ObjectUtil.isNotEmpty(config.getIsBound())&&config.getIsBound()){
|
|
|
|
|
+ List<OptionsVO> list = fsUserCourseCategoryService.selectFsUserCourseCategoryPidList(userId);
|
|
|
|
|
+ return R.ok().put("data", list);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
List<OptionsVO> list = fsUserCourseCategoryService.selectFsUserCourseCategoryPidList();
|
|
List<OptionsVO> list = fsUserCourseCategoryService.selectFsUserCourseCategoryPidList();
|
|
|
return R.ok().put("data", list);
|
|
return R.ok().put("data", list);
|