he2802 2 éve
szülő
commit
dc96234f08

+ 9 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -34,6 +34,7 @@ import com.zhongzheng.modules.bank.vo.QuestionVo;
 import com.zhongzheng.modules.base.bo.ConfigQueryBo;
 import com.zhongzheng.modules.course.bo.ExternalQuestionBo;
 import com.zhongzheng.modules.course.bo.ReplenishExamBo;
+import com.zhongzheng.modules.course.vo.CourseChapterVo;
 import com.zhongzheng.modules.course.vo.ExternalQuestionVo;
 import com.zhongzheng.modules.course.vo.ReplenishExamVo;
 import com.zhongzheng.modules.distribution.bo.DistributionActivityGoodsQueryBo;
@@ -778,6 +779,14 @@ public class CommonController extends BaseController {
         return AjaxResult.success(iClassGradeUserService.pushOfficialPeriodMore(list));
     }
 
+    @ApiOperation("批量学时信息推送CC")
+    @PreAuthorize("@ss.hasPermi('app:user:edit')")
+    @PostMapping("/common/free/pushPeriodCC")
+    public AjaxResult pushPeriodCC(@RequestBody ClassGradeUserQueryBo  bo) {
+        List<CourseChapterVo> chapterList =  iClassGradeUserService.findChapterList(bo);
+        return AjaxResult.success();
+    }
+
     @ApiOperation("测试获取山东题库")
     @PreAuthorize("@ss.hasPermi('system:withdrawal:add')")
     @Log(title = "测试获取山东题库", businessType = BusinessType.INSERT)

+ 9 - 7
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -1528,9 +1528,10 @@
     </select>
 
     <select id="findChapterList" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo" resultMap="CourseChapterResultVo">
-        (SELECT
+        SELECT ui.* from (SELECT
             cc.chapter_id,
-            cc.`name`
+            cc.`name`,
+            m.sort
         FROM
             course_module_chapter p
                 LEFT JOIN course_chapter cc ON p.chapter_id = cc.chapter_id
@@ -1538,18 +1539,19 @@
                 LEFT JOIN goods_course gc ON gc.course_id = m.course_id
         WHERE
             gc.goods_id = #{goodsId}
-          AND m.type =  1 ORDER BY m.sort) UNION
-        (SELECT
+          AND m.type =  1 UNION
+        SELECT
             cc.chapter_id,
-            cc.`name`
+            cc.`name`,
+            m.sort
         FROM
             course_menu m
                 LEFT JOIN course_chapter cc ON m.menu_id = cc.chapter_id
                 LEFT JOIN goods_course gc ON gc.course_id = m.course_id
         WHERE
             gc.goods_id = #{goodsId}
-          AND m.type =  2
-        ORDER BY m.sort )
+          AND m.type =  2)ui
+        ORDER BY ui.sort
     </select>
 
     <select id="selectOfficialInfoCount" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo" resultType="long">