Ver Fonte

fix 分班

he2802 há 3 anos atrás
pai
commit
85202e4a6e

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderServiceImpl.java

@@ -1567,6 +1567,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         //都不符合则创建新班级
         ClassGrade classGrade = new ClassGrade();
         if (isConfigTp) {
+            classGrade.setClassStatus(0);
             classGrade.setLearningStatus(2);//待定
             classGrade.setStudentUpper(ClassGrade.INIT_UPPER); //上限300
         } else {

+ 6 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserExamRecordQueryBo.java

@@ -64,5 +64,10 @@ public class UserExamRecordQueryBo extends BaseEntity {
 	/** 订单商品ID */
 	@ApiModelProperty("订单商品ID")
 	private Long orderGoodsId;
-
+	/** 教育ID */
+	@ApiModelProperty("教育ID")
+	private Long educationTypeId;
+	/** 业务ID */
+	@ApiModelProperty("业务ID")
+	private Long businessId;
 }

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserExamWrongRecordQueryBo.java

@@ -61,4 +61,10 @@ public class UserExamWrongRecordQueryBo extends BaseEntity {
 	/** 订单商品ID */
 	@ApiModelProperty("订单商品ID")
 	private Long orderGoodsId;
+	/** 教育ID */
+	@ApiModelProperty("教育ID")
+	private Long educationTypeId;
+	/** 业务ID */
+	@ApiModelProperty("业务ID")
+	private Long businessId;
 }

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -412,7 +412,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN course_business cb ON g.business_id = cb.id
         LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
         where 1=1
-      
+
         <if test="gradeId != null and gradeId !='' ">
           and cgu.grade_id = #{gradeId}
         </if>

+ 7 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserExamRecordMapper.xml

@@ -150,6 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN user_exam_record ue ON t.record_id = ue.record_id
         LEFT JOIN exam e ON ue.exam_id = e.exam_id
         LEFT JOIN exam_paper ep ON e.exam_paper_id = ep.paper_id
+        LEFT JOIN goods g ON g.goods_id = ue.goods_id
         WHERE
         ue.user_id = #{userId}
         <if test="paperId != null and paperId != ''">
@@ -161,6 +162,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="examId != null and examId != ''">
             AND ue.exam_id = #{examId}
         </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         ORDER by ue.record_id DESC
     </select>
 

+ 14 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserExamWrongRecordMapper.xml

@@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         user_exam_wrong_record uew
         LEFT JOIN exam e ON uew.exam_id = e.exam_id
         LEFT JOIN exam_paper ep ON ep.paper_id = e.exam_paper_id
+        LEFT JOIN goods g ON g.goods_id = uew.goods_id
         WHERE
         uew.user_id = #{userId}
         <if test="goodsId != null and goodsId != ''">
@@ -70,6 +71,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="paperId != null and paperId != ''">
             AND e.exam_paper_id = #{paperId}
         </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         GROUP BY
         e.exam_id
         ORDER BY
@@ -114,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND e.exam_paper_id = #{paperId}
         </if>) uew
                     LEFT JOIN question q ON uew.question_id = q.question_id
+        LEFT JOIN goods g ON g.goods_id = uew.goods_id
         WHERE
         1 = 1
         <if test="goodsId != null and goodsId != ''">
@@ -122,6 +130,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="orderGoodsId != null and orderGoodsId != ''">
             AND uew.order_goods_id = #{orderGoodsId}
         </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND g.education_type_id = #{educationTypeId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND g.business_id = #{businessId}
+        </if>
         GROUP BY
             q.type
     </select>