|
|
@@ -0,0 +1,95 @@
|
|
|
+package bus.controller.biz;
|
|
|
+
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageSerializable;
|
|
|
+import bus.model.dto.BUserCourseDto;
|
|
|
+import bus.model.dto.BUserCoursePageDto;
|
|
|
+import bus.model.vo.BUserCourseVo;
|
|
|
+import bus.service.BUserCourseService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+import com.qzwisdom.qzframework.core.tool.base.controller.BaseController;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Program: bus
|
|
|
+ * @Description: 描述
|
|
|
+ * @Author: zy
|
|
|
+ * @Date: 2025-03-11 18:22:22
|
|
|
+ **/
|
|
|
+@Slf4j
|
|
|
+@CrossOrigin
|
|
|
+@RestController
|
|
|
+@Api(tags = "bUserCourse接口")
|
|
|
+@RequestMapping(value="/bUserCourse")
|
|
|
+public class BUserCourseController implements BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BUserCourseService bUserCourseService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 详情
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("详情")
|
|
|
+ @GetMapping(value = "getDetailById")
|
|
|
+ public BUserCourseVo getDetailById(@RequestParam String id){
|
|
|
+ return doSingle(bUserCourseService.getDetailById(id),BUserCourseVo::new);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存
|
|
|
+ * @param dto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("保存")
|
|
|
+ @PostMapping(value = "save")
|
|
|
+ public String save(@RequestBody BUserCourseDto dto){
|
|
|
+ bUserCourseService.save(dto);
|
|
|
+ return "保存成功";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 列表
|
|
|
+ * @param dto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("列表")
|
|
|
+ @PostMapping(value = "list")
|
|
|
+ public PageSerializable<BUserCourseVo> list(@RequestBody BUserCoursePageDto dto){
|
|
|
+ PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
|
|
+ return new PageSerializable<>(bUserCourseService.list(dto));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改
|
|
|
+ * @param dto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("修改")
|
|
|
+ @PostMapping(value = "update")
|
|
|
+ public String update(@RequestBody BUserCourseDto dto){
|
|
|
+ bUserCourseService.update(dto);
|
|
|
+ return "修改成功";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("删除")
|
|
|
+ @GetMapping(value = "deleteById")
|
|
|
+ public String deleteById(@RequestParam String id){
|
|
|
+ bUserCourseService.delete(id);
|
|
|
+ return "删除成功";
|
|
|
+ }
|
|
|
+
|
|
|
+}
|