Explorar o código

修改订单记录

change %!s(int64=4) %!d(string=hai) anos
pai
achega
cfe7d77d35

+ 11 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseServiceImpl.java

@@ -208,6 +208,17 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
                 }
             }
         }
+        GoodsPeriodVo goodsPeriodVo = goodsPeriodVos.get(0);
+        goodsPeriodVo.setPeriodStatus(1L);
+        goodsPeriodVos.add(goodsPeriodVo);
+
+        GoodsPeriodVo goodsPeriodVo1 = goodsPeriodVos.get(0);
+        goodsPeriodVo.setPeriodStatus(2L);
+        goodsPeriodVos.add(goodsPeriodVo1);
+
+        GoodsPeriodVo goodsPeriodVo2 = goodsPeriodVos.get(0);
+        goodsPeriodVo.setPeriodStatus(3L);
+        goodsPeriodVos.add(goodsPeriodVo2);
         return goodsPeriodVos;
     }
 

+ 15 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/GoodsPeriodVo.java

@@ -82,4 +82,19 @@ public class GoodsPeriodVo {
 	/** 待审*/
 	@ApiModelProperty("試卷待审")
 	private Long examPending;
+
+	/** 学习进度 */
+	@ApiModelProperty("0无预约考试 1有预约考试")
+	private Long applyStatus;
+
+	/** 学习进度 */
+	@ApiModelProperty("0无刷题 1有刷题")
+	private Long beforeStatus;
+
+	/** 学习进度 */
+	@ApiModelProperty("考试标题")
+	private String applyName;
+
+	@ApiModelProperty("前培名字")
+	private String beforeName;
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/service/impl/InformServiceImpl.java

@@ -156,6 +156,7 @@ public class InformServiceImpl extends ServiceImpl<InformMapper, Inform> impleme
             InformUserAddBo informUserAddBo = new InformUserAddBo();
             informUserAddBo.setInformId(add.getInformId());
             informUserAddBo.setUserId(userId);
+            informUserAddBo.setUserId(userId);
             informUserAddBo.setCreateTime(DateUtils.getNowTime());
             informUserAddBo.setUpdateTime(DateUtils.getNowTime());
             iInformUserService.insertByAddBo(informUserAddBo);

+ 9 - 1
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -95,6 +95,10 @@
         <result property="gradeId" column="grade_id"/>
         <result property="examNum" column="exam_num"/>
         <result property="recordNum" column="record_num"/>
+        <result property="applyStatus" column="apply_status"/>
+        <result property="beforeStatus" column="before_status"/>
+        <result property="applyName" column="apply_name"/>
+        <result property="beforeName" column="before_name"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.goods.vo.GoodsPeriodStatusVo" id="GoodsPeriodStatusVo">
@@ -335,7 +339,11 @@
                 ups.`status` =1 and ups.period_status = 1 and up.goods_id=g.goods_id and up.user_id = cgu.user_id and up.type = 2) as exam_pass,
             (SELECT
                  COUNT(up.id) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where ups.`status`
-                =0 and ups.period_status = 1 and up.goods_id=g.goods_id and up.user_id = cgu.user_id and up.type = 2) as exam_cheat
+                =0 and ups.period_status = 1 and up.goods_id=g.goods_id and up.user_id = cgu.user_id and up.type = 2) as exam_cheat,
+            (case WHEN (SELECT COUNT(1) FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = cgg.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) >0 then 1 ELSE 0 end) as apply_status,
+                (case WHEN (SELECT COUNT(1) FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = cgg.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) >0 then 1 ELSE 0 end) as before_status,
+            (SELECT ea.apply_name FROM exam_apply_goods eag LEFT JOIN exam_apply ea on eag.apply_id = ea.apply_id where eag.goods_id = cgg.goods_id and ea.`status` = 1 and unix_timestamp(now()) BETWEEN ea.apply_start_time and ea.apply_end_time) as apply_name,
+            (SELECT eb.before_name FROM exam_before_goods ebg LEFT JOIN exam_before eb on ebg.before_id = eb.before_id where ebg.goods_id = cgg.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) as before_name
         FROM
             class_grade_user cgu
                 LEFT JOIN class_grade_goods cgg ON cgu.grade_id = cgg.grade_id