|
@@ -0,0 +1,112 @@
|
|
|
+package com.zhongzheng.controller.course;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+import com.zhongzheng.modules.course.bo.CourseStreamingBusinessAddBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseStreamingBusinessEditBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseStreamingBusinessQueryBo;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseStreamingBusinessService;
|
|
|
+import com.zhongzheng.modules.course.vo.CourseStreamingBusinessVo;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.zhongzheng.common.annotation.Log;
|
|
|
+import com.zhongzheng.common.core.controller.BaseController;
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
+import com.zhongzheng.common.enums.BusinessType;
|
|
|
+import com.zhongzheng.common.utils.poi.ExcelUtil;
|
|
|
+import com.zhongzheng.common.core.page.TableDataInfo;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 课程流适用业务关系Controller
|
|
|
+ *
|
|
|
+ * @author hjl
|
|
|
+ * @date 2021-10-11
|
|
|
+ */
|
|
|
+@Api(value = "课程流适用业务关系控制器", tags = {"课程流适用业务关系管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/system/business")
|
|
|
+public class CourseStreamingBusinessController extends BaseController {
|
|
|
+
|
|
|
+ private final ICourseStreamingBusinessService iCourseStreamingBusinessService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询课程流适用业务关系列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询课程流适用业务关系列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo<CourseStreamingBusinessVo> list(CourseStreamingBusinessQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<CourseStreamingBusinessVo> list = iCourseStreamingBusinessService.queryList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出课程流适用业务关系列表
|
|
|
+ */
|
|
|
+ /* @ApiOperation("导出课程流适用业务关系列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:export')")
|
|
|
+ @Log(title = "课程流适用业务关系", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/export")
|
|
|
+ public AjaxResult<CourseStreamingBusinessVo> export(CourseStreamingBusinessQueryBo bo) {
|
|
|
+ List<CourseStreamingBusinessVo> list = iCourseStreamingBusinessService.queryList(bo);
|
|
|
+ ExcelUtil<CourseStreamingBusinessVo> util = new ExcelUtil<CourseStreamingBusinessVo>(CourseStreamingBusinessVo.class);
|
|
|
+ return util.exportExcel(list, "课程流适用业务关系");
|
|
|
+ }*/
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取课程流适用业务关系详细信息
|
|
|
+ */
|
|
|
+ @ApiOperation("获取课程流适用业务关系详细信息")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:query')")
|
|
|
+ @GetMapping("/{id}")
|
|
|
+ public AjaxResult<CourseStreamingBusinessVo> getInfo(@PathVariable("id" ) Long id) {
|
|
|
+ return AjaxResult.success(iCourseStreamingBusinessService.queryById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增课程流适用业务关系
|
|
|
+ */
|
|
|
+ @ApiOperation("新增课程流适用业务关系")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:add')")
|
|
|
+ @Log(title = "课程流适用业务关系", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping()
|
|
|
+ public AjaxResult<Void> add(@RequestBody CourseStreamingBusinessAddBo bo) {
|
|
|
+ return toAjax(iCourseStreamingBusinessService.insertByAddBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改课程流适用业务关系
|
|
|
+ */
|
|
|
+ @ApiOperation("修改课程流适用业务关系")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:edit')")
|
|
|
+ @Log(title = "课程流适用业务关系", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("/edit")
|
|
|
+ public AjaxResult<Void> edit(@RequestBody CourseStreamingBusinessEditBo bo) {
|
|
|
+ return toAjax(iCourseStreamingBusinessService.updateByEditBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除课程流适用业务关系
|
|
|
+ */
|
|
|
+ @ApiOperation("删除课程流适用业务关系")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:remove')")
|
|
|
+ @Log(title = "课程流适用业务关系" , businessType = BusinessType.DELETE)
|
|
|
+ @PostMapping("/del/{ids}")
|
|
|
+ public AjaxResult<Void> remove(@PathVariable Long[] ids) {
|
|
|
+ return toAjax(iCourseStreamingBusinessService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
|
|
+ }
|
|
|
+}
|