|
@@ -0,0 +1,112 @@
|
|
|
+package com.zhongzheng.controller.course;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+import com.zhongzheng.modules.course.bo.CourseModuleBusinessAddBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseModuleBusinessEditBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseModuleBusinessQueryBo;
|
|
|
+import com.zhongzheng.modules.course.service.ICourseModuleBusinessService;
|
|
|
+import com.zhongzheng.modules.course.vo.CourseModuleBusinessVo;
|
|
|
+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-09
|
|
|
+ */
|
|
|
+@Api(value = "课程模块适用业务关系控制器", tags = {"课程模块适用业务关系管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/course/module/business")
|
|
|
+public class CourseModuleBusinessController extends BaseController {
|
|
|
+
|
|
|
+ private final ICourseModuleBusinessService iCourseModuleBusinessService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询课程模块适用业务关系列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询课程模块适用业务关系列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo<CourseModuleBusinessVo> list(CourseModuleBusinessQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<CourseModuleBusinessVo> list = iCourseModuleBusinessService.queryList(bo);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出课程模块适用业务关系列表
|
|
|
+ */
|
|
|
+ /* @ApiOperation("导出课程模块适用业务关系列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:export')")
|
|
|
+ @Log(title = "课程模块适用业务关系", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/export")
|
|
|
+ public AjaxResult<CourseModuleBusinessVo> export(CourseModuleBusinessQueryBo bo) {
|
|
|
+ List<CourseModuleBusinessVo> list = iCourseModuleBusinessService.queryList(bo);
|
|
|
+ ExcelUtil<CourseModuleBusinessVo> util = new ExcelUtil<CourseModuleBusinessVo>(CourseModuleBusinessVo.class);
|
|
|
+ return util.exportExcel(list, "课程模块适用业务关系");
|
|
|
+ }*/
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取课程模块适用业务关系详细信息
|
|
|
+ */
|
|
|
+ @ApiOperation("获取课程模块适用业务关系详细信息")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:query')")
|
|
|
+ @GetMapping("/{id}")
|
|
|
+ public AjaxResult<CourseModuleBusinessVo> getInfo(@PathVariable("id" ) Long id) {
|
|
|
+ return AjaxResult.success(iCourseModuleBusinessService.queryById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增课程模块适用业务关系
|
|
|
+ */
|
|
|
+ @ApiOperation("新增课程模块适用业务关系")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:add')")
|
|
|
+ @Log(title = "课程模块适用业务关系", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping()
|
|
|
+ public AjaxResult<Void> add(@RequestBody CourseModuleBusinessAddBo bo) {
|
|
|
+ return toAjax(iCourseModuleBusinessService.insertByAddBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改课程模块适用业务关系
|
|
|
+ */
|
|
|
+ @ApiOperation("修改课程模块适用业务关系")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:edit')")
|
|
|
+ @Log(title = "课程模块适用业务关系", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("/edit")
|
|
|
+ public AjaxResult<Void> edit(@RequestBody CourseModuleBusinessEditBo bo) {
|
|
|
+ return toAjax(iCourseModuleBusinessService.updateByEditBo(bo) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除课程模块适用业务关系
|
|
|
+ */
|
|
|
+ /*@ApiOperation("删除课程模块适用业务关系")
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:business:remove')")
|
|
|
+ @Log(title = "课程模块适用业务关系" , businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult<Void> remove(@PathVariable Long[] ids) {
|
|
|
+ return toAjax(iCourseModuleBusinessService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
|
|
+ }*/
|
|
|
+}
|