|
@@ -42,6 +42,18 @@ public class FsUserCourseController extends BaseController
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询公域课程列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicList')")
|
|
|
+ @GetMapping("/publicList")
|
|
|
+ public TableDataInfo publicList(FsUserCourse fsUserCourse)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<FsUserCourseListPVO> list = fsUserCourseService.selectFsUserCourseListPVO(fsUserCourse);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 导出课程列表
|
|
|
*/
|
|
@@ -55,6 +67,19 @@ public class FsUserCourseController extends BaseController
|
|
|
return util.exportExcel(list, "课程数据");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 导出课程列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicExport')")
|
|
|
+ @Log(title = "课程", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/publicExport")
|
|
|
+ public AjaxResult publicExport(FsUserCourse fsUserCourse)
|
|
|
+ {
|
|
|
+ List<FsUserCourse> list = fsUserCourseService.selectFsUserCourseList(fsUserCourse);
|
|
|
+ ExcelUtil<FsUserCourse> util = new ExcelUtil<FsUserCourse>(FsUserCourse.class);
|
|
|
+ return util.exportExcel(list, "课程数据");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取课程详细信息
|
|
|
*/
|
|
@@ -65,6 +90,16 @@ public class FsUserCourseController extends BaseController
|
|
|
return AjaxResult.success(fsUserCourseService.selectFsUserCourseByCourseId(courseId));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取公域课程详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicQuery')")
|
|
|
+ @GetMapping(value = "/public/{courseId}")
|
|
|
+ public AjaxResult publicGetInfo(@PathVariable("courseId") Long courseId)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(fsUserCourseService.selectFsUserCourseByCourseId(courseId));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 新增课程
|
|
|
*/
|
|
@@ -76,6 +111,17 @@ public class FsUserCourseController extends BaseController
|
|
|
return toAjax(fsUserCourseService.insertFsUserCourse(fsUserCourse));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新增公域课程
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicAdd')")
|
|
|
+ @Log(title = "课程", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping("/public")
|
|
|
+ public AjaxResult publicAdd(@RequestBody FsUserCourse fsUserCourse)
|
|
|
+ {
|
|
|
+ return toAjax(fsUserCourseService.insertFsUserCourse(fsUserCourse));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 修改课程
|
|
|
*/
|
|
@@ -87,6 +133,17 @@ public class FsUserCourseController extends BaseController
|
|
|
return toAjax(fsUserCourseService.updateFsUserCourse(fsUserCourse));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改公域课程
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicEdit')")
|
|
|
+ @Log(title = "课程", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping("/public")
|
|
|
+ public AjaxResult publicEdit(@RequestBody FsUserCourse fsUserCourse)
|
|
|
+ {
|
|
|
+ return toAjax(fsUserCourseService.updateFsUserCourse(fsUserCourse));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 删除课程
|
|
|
*/
|
|
@@ -98,6 +155,17 @@ public class FsUserCourseController extends BaseController
|
|
|
return toAjax(fsUserCourseService.deleteFsUserCourseByCourseIds(courseIds));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除公域课程
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicRemove')")
|
|
|
+ @Log(title = "课程", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/public/{courseIds}")
|
|
|
+ public AjaxResult publicRemove(@PathVariable Long[] courseIds)
|
|
|
+ {
|
|
|
+ return toAjax(fsUserCourseService.deleteFsUserCourseByCourseIds(courseIds));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@GetMapping("/getAllList")
|
|
|
public R getAllList()
|
|
@@ -106,6 +174,7 @@ public class FsUserCourseController extends BaseController
|
|
|
return R.ok().put("data", list);
|
|
|
}
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:updateIsShow')")
|
|
|
@Log(title = "课程上架", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/updateIsShow")
|
|
|
public AjaxResult updateIsShow(@RequestBody FsUserCourse fsUserCourse)
|
|
@@ -113,6 +182,14 @@ public class FsUserCourseController extends BaseController
|
|
|
return toAjax(fsUserCourseService.updateFsUserCourse(fsUserCourse));
|
|
|
}
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicUpdateIsShow')")
|
|
|
+ @Log(title = "课程上架", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("/publicUpdateIsShow")
|
|
|
+ public AjaxResult publicUpdateIsShow(@RequestBody FsUserCourse fsUserCourse)
|
|
|
+ {
|
|
|
+ return toAjax(fsUserCourseService.updateFsUserCourse(fsUserCourse));
|
|
|
+ }
|
|
|
+
|
|
|
@PreAuthorize("@ss.hasPermi('course:userCourse:putOn')")
|
|
|
@Log(title = "课程批量上架", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/putOn/{courseIds}")
|
|
@@ -121,6 +198,14 @@ public class FsUserCourseController extends BaseController
|
|
|
return toAjax(fsUserCourseService.updateFsUserCourseIsShow(courseIds,1));
|
|
|
}
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicPutOn')")
|
|
|
+ @Log(title = "课程批量上架", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("/publicPutOn/{courseIds}")
|
|
|
+ public AjaxResult publicPutOn(@PathVariable Long[] courseIds)
|
|
|
+ {
|
|
|
+ return toAjax(fsUserCourseService.updateFsUserCourseIsShow(courseIds,1));
|
|
|
+ }
|
|
|
+
|
|
|
@PreAuthorize("@ss.hasPermi('course:userCourse:putOn')")
|
|
|
@Log(title = "课程批量下架", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/pullOff/{courseIds}")
|
|
@@ -128,4 +213,12 @@ public class FsUserCourseController extends BaseController
|
|
|
{
|
|
|
return toAjax(fsUserCourseService.updateFsUserCourseIsShow(courseIds,0));
|
|
|
}
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('course:userCourse:publicPutOff')")
|
|
|
+ @Log(title = "课程批量下架", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("/publicPullOff/{courseIds}")
|
|
|
+ public AjaxResult publicPullOff(@PathVariable Long[] courseIds)
|
|
|
+ {
|
|
|
+ return toAjax(fsUserCourseService.updateFsUserCourseIsShow(courseIds,0));
|
|
|
+ }
|
|
|
}
|