he2802 2 lat temu
rodzic
commit
6a4f1e19f9

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/GoodsUserVo.java

@@ -412,4 +412,7 @@ public class GoodsUserVo {
 	@Excel(name = "学员电话")
 	@ApiModelProperty("学员电话")
 	private String telPhone;
+
+	@ApiModelProperty("大于0开始学习")
+	private Integer studyStatus;
 }

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

@@ -215,6 +215,7 @@
         <result property="realName" column="realname"/>
         <result property="idCard" column="id_card" typeHandler="com.zhongzheng.common.type.EncryptHandler"/>
         <result property="telPhone" column="telphone" typeHandler="com.zhongzheng.common.type.EncryptHandler"/>
+        <result property="studyStatus" column="study_status"/>
     </resultMap>
 
     <resultMap type="com.zhongzheng.modules.grade.vo.ClassGradeVo" id="ClassGradeVoResult">
@@ -542,7 +543,8 @@
         (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 = g.goods_id and eb.`status` = 1 and unix_timestamp(now()) BETWEEN eb.before_start_time and eb.before_end_time) as before_name,
         (SELECT `status` from user_profile where user_id = o.user_id and goods_id = g.goods_id and current_status = 1 and type_status = 1 and order_goods_id = og.order_goods_id limit 1 ) as profile_status,
         (case WHEN(SELECT COUNT(1) from profile_tp where `status`=1 and FIND_IN_SET(g.goods_id,goods_ids) ) >0 then 1 ELSE 0 end) as profile_tp_status,
-        (SELECT GROUP_CONCAT(subject_name)  from course_subject where FIND_IN_SET(id,g.subject_ids)) subject_names
+        (SELECT GROUP_CONCAT(subject_name)  from course_subject where FIND_IN_SET(id,g.subject_ids)) subject_names,
+        (SELECT count(*) from user_study_record usr where usr.user_id = o.user_id and usr.order_goods_id = og.order_goods_id) as study_status
         <if test="userId != null and userId != ''">
         ,
         us.exam_status  as sub_exam_status,