change il y a 3 ans
Parent
commit
80cc861d78

+ 47 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/course/CourseSubjectController.java

@@ -0,0 +1,47 @@
+package com.zhongzheng.controller.course;
+
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.modules.course.bo.CourseSubjectAddBo;
+import com.zhongzheng.modules.course.bo.CourseSubjectEditBo;
+import com.zhongzheng.modules.course.bo.CourseSubjectQueryBo;
+import com.zhongzheng.modules.course.service.ICourseSubjectService;
+import com.zhongzheng.modules.course.vo.CourseSubjectVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 科目Controller
+ * 
+ * @author ruoyi
+ * @date 2021-10-09
+ */
+@Api(value = "科目控制器", tags = {"科目管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/course/subject")
+public class CourseSubjectController extends BaseController {
+
+    private final ICourseSubjectService iCourseSubjectService;
+
+    /**
+     * 查询科目列表
+     */
+    @ApiOperation("查询科目列表")
+    @PreAuthorize("@ss.hasPermi('course:subject:list')")
+    @GetMapping("/list")
+    public TableDataInfo<CourseSubjectVo> list(CourseSubjectQueryBo bo) {
+        startPage();
+        List<CourseSubjectVo> list = iCourseSubjectService.queryList(bo);
+        return getDataTable(list);
+    }
+}

+ 2 - 2
zhongzheng-api/src/main/java/com/zhongzheng/controller/plan/UserPlanController.java

@@ -108,9 +108,9 @@ public class UserPlanController extends BaseController {
     /**
      * 查询学习计划列表
      */
-    @ApiOperation("查询学员能生成学习计划的课程")
+    @ApiOperation("查询学员能生成学习计划的商品")
     @PreAuthorize("@ss.hasPermi('system:plan:list')")
-    @GetMapping("/listCourse")
+    @GetMapping("/listGoods")
     public TableDataInfo<CourseVo> listCourse(UserPlanQueryBo bo) {
         ClientLoginUser loginUser = WxTokenService.getLoginUser(ServletUtils.getRequest());
         bo.setUserId(loginUser.getUser().getUserId());

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamBeforeServiceImpl.java

@@ -3,6 +3,7 @@ package com.zhongzheng.modules.exam.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.exam.bo.*;
 import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
 import org.springframework.stereotype.Service;
@@ -74,6 +75,7 @@ public class ExamBeforeServiceImpl extends ServiceImpl<ExamBeforeMapper, ExamBef
     public Boolean insertByAddBo(ExamBeforeAddBo bo) {
         ExamBefore add = BeanUtil.toBean(bo, ExamBefore.class);
         validEntityBeforeSave(add);
+        add.setCode(ServletUtils.getEncoded("QP"));
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
         return this.save(add);